Repository navigation
Nightly Build #1062
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: | |
| permissions: | |
| contents: read | |
| issues: write | |
| jobs: | |
| build: | |
| name: "Nightly Build" | |
| env: | |
| ASPNETCORE_ENVIRONMENT: "Production" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 10.0.x | |
| - 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 --no-restore | |
| - name: Run Unit Tests | |
| run: | | |
| echo "ASPNETCORE_ENVIRONMENT are > ${ASPNETCORE_ENVIRONMENT}" | |
| dotnet run --project "EstateReportingAPI.Tests\EstateReportingAPI.Tests.csproj" --configuration Release --no-build -- --coverage --coverage-output-format cobertura --coverage-output coverage.cobertura.xml --results-directory "./coverage/unit" | |
| dotnet run --project "EstateReportingAPI.BusinessLogic.UnitTests\EstateReportingAPI.BusinessLogic.UnitTests.csproj" --configuration Release --no-build -- --coverage --coverage-output-format cobertura --coverage-output coverage.cobertura.xml --results-directory "./coverage/unit" | |
| - name: Build Docker Image | |
| run: docker build . --file EstateReportingAPI/Dockerfile --tag estatereportingapi:latest | |
| - name: Run Integration Tests | |
| run: | | |
| dotnet run --project "EstateReportingAPI.IntegrationTests\EstateReportingAPI.IntegrationTests.csproj" --configuration Release --no-build -- --coverage --coverage-output-format cobertura --coverage-output coverage.cobertura.xml --results-directory "./coverage/integration" | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: tracelogs | |
| path: /home/runner/trace/ | |
| - name: Notify on nightly failure | |
| if: ${{ failure() }} | |
| uses: TransactionProcessing/org-ci-workflows/.github/actions/nightly-failure-issue@main | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| title: Investigate Nightly Build Failure | |
| labels: nightlybuild | |
| dedupe_key: nightlybuild | |
| body: | | |
| Repo: ${{ github.repository }} | |
| Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
| Commit: ${{ github.sha }} | |
| Workflow: ${{ github.workflow }} | |
| Job: ${{ github.job }} |