Repository navigation
Nightly Build #2692
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: "10 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@v2.3.4 | |
| - name: Free Disk Space | |
| uses: endersonmenezes/free-disk-space@v3 # Use @main for latest, @v3 for stable | |
| with: | |
| remove_android: true | |
| remove_haskell: true | |
| rm_cmd: "rm" # Use 'rmz' for faster deletion (default: 'rm') | |
| rmz_version: "3.1.1" # Required when rm_cmd is 'rmz' | |
| testing: false | |
| - name: Setup .NET SDK | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 10.0.400 | |
| - 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 TransactionProcessor.sln --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }} | |
| - name: Build Code | |
| run: dotnet build TransactionProcessor.sln --configuration Release | |
| - name: Run Unit Tests | |
| run: | | |
| echo "ASPNETCORE_ENVIRONMENT are > ${ASPNETCORE_ENVIRONMENT}" | |
| dotnet test "TransactionProcessor.BusinessLogic.Tests/TransactionProcessor.BusinessLogic.Tests.csproj" --configuration Release --no-build --no-restore -- --report-xunit-trx --report-xunit-trx-filename "buslogic-test-results.trx" | |
| dotnet test "TransactionProcessor.ProjectionEngine.Tests/TransactionProcessor.ProjectionEngine.Tests.csproj" --configuration Release --no-build --no-restore -- --report-xunit-trx --report-xunit-trx-filename "projection-test-results.trx" | |
| dotnet test "TransactionProcessor.Aggregates.Tests/TransactionProcessor.Aggregates.Tests.csproj" --configuration Release --no-build --no-restore -- --report-xunit-trx --report-xunit-trx-filename "aggregates-test-results.trx" | |
| dotnet test "TransactionProcessor.Tests/TransactionProcessor.Tests.csproj" --configuration Release --no-build --no-restore -- --report-xunit-trx --report-xunit-trx-filename "tests-test-results.trx" | |
| dotnet test "TransactionProcessor.DatabaseTests/TransactionProcessor.DatabaseTests.csproj" --configuration Release --no-build --no-restore -- --report-xunit-trx --report-xunit-trx-filename "database-test-results.trx" | |
| - name: Build Docker Image | |
| run: docker build . --file TransactionProcessor/Dockerfile --tag transactionprocessor:latest | |
| - name: Run Integration Tests | |
| run: dotnet test "TransactionProcessor.IntegrationTests/TransactionProcessor.IntegrationTests.csproj" --configuration Release --no-build --no-restore -- --report-trx --report-trx-filename "integration-test-results.trx" | |
| - uses: actions/upload-artifact@v4.4.0 | |
| if: always() | |
| 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 }} |