Nightly Build #849
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Nightly Build | |
| on: | |
| schedule: | |
| - cron: "45 23 * * *" | |
| repository_dispatch: | |
| jobs: | |
| build: | |
| name: "Nightly Build" | |
| env: | |
| ASPNETCORE_ENVIRONMENT: "Production" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2.3.4 | |
| - name: Set Up Variables | |
| run: echo "action_url=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_ENV | |
| - name: Restore Nuget Packages | |
| run: dotnet restore EstateReportingAPI.sln --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }} | |
| - name: Build Code | |
| run: dotnet build EstateReportingAPI.sln --configuration Release | |
| - name: Run Unit Tests | |
| run: | | |
| echo "ASPNETCORE_ENVIRONMENT are > ${ASPNETCORE_ENVIRONMENT}" | |
| dotnet test "EstateReportingAPI.Tests\EstateReportingAPI.Tests.csproj" /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov1.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov" | |
| - name: Build Docker Image | |
| run: docker build . --file EstateReportingAPI/Dockerfile --tag estatereportingapi:latest | |
| - name: Run Integration Tests | |
| run: | | |
| dotnet test "EstateReportingAPI.IntegrationTests\EstateReportingAPI.IntegrationTests.csproj" /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov2.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov" | |
| - uses: actions/upload-artifact@v4 | |
| if: ${{ failure() }} | |
| with: | |
| name: tracelogs | |
| path: /home/txnproc/trace/ | |
| - uses: dacbd/create-issue-action@main | |
| if: ${{ failure() }} | |
| name: Create an issue on build failure | |
| with: | |
| title: Investigate Nightly Build Failure | |
| token: ${{secrets.GITHUB_TOKEN}} | |
| labels: nightlybuild | |
| body: Url is ${{env.action_url}} |