Merge pull request #70 from Basalt-Foundation/fix/per-ip-counter-leak #154
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| env: | |
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
| DOTNET_CLI_TELEMETRY_OPTOUT: true | |
| jobs: | |
| test: | |
| name: "Test (shard-${{ matrix.shard }})" | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - shard: 1 | |
| projects: >- | |
| tests/Basalt.Sdk.Tests/Basalt.Sdk.Tests.csproj | |
| - shard: 2 | |
| projects: >- | |
| tests/Basalt.Confidentiality.Tests/Basalt.Confidentiality.Tests.csproj | |
| tests/Basalt.Consensus.Tests/Basalt.Consensus.Tests.csproj | |
| tests/Basalt.Bridge.Tests/Basalt.Bridge.Tests.csproj | |
| - shard: 3 | |
| projects: >- | |
| tests/Basalt.Storage.Tests/Basalt.Storage.Tests.csproj | |
| tests/Basalt.Execution.Tests/Basalt.Execution.Tests.csproj | |
| tests/Basalt.Sdk.Analyzers.Tests/Basalt.Sdk.Analyzers.Tests.csproj | |
| tests/Basalt.Integration.Tests/Basalt.Integration.Tests.csproj | |
| - shard: 4 | |
| projects: >- | |
| tests/Basalt.Network.Tests/Basalt.Network.Tests.csproj | |
| tests/Basalt.Sdk.Wallet.Tests/Basalt.Sdk.Wallet.Tests.csproj | |
| tests/Basalt.Core.Tests/Basalt.Core.Tests.csproj | |
| tests/Basalt.Codec.Tests/Basalt.Codec.Tests.csproj | |
| tests/Basalt.Compliance.Tests/Basalt.Compliance.Tests.csproj | |
| tests/Basalt.Crypto.Tests/Basalt.Crypto.Tests.csproj | |
| tests/Basalt.Api.Tests/Basalt.Api.Tests.csproj | |
| tests/Basalt.Node.Tests/Basalt.Node.Tests.csproj | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET 9 | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '9.0.x' | |
| - name: Cache NuGet packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.nuget/packages | |
| key: nuget-${{ runner.os }}-${{ hashFiles('Directory.Packages.props', '**/*.csproj') }} | |
| restore-keys: | | |
| nuget-${{ runner.os }}- | |
| - name: Install native dependencies | |
| run: sudo apt-get update && sudo apt-get install -y librocksdb-dev | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build --no-restore --warnaserror | |
| - name: Test | |
| run: | | |
| for project in ${{ matrix.projects }}; do | |
| dotnet test "$project" --no-build --verbosity normal \ | |
| --logger "trx;LogFileName=$(basename "$project" .csproj).trx" | |
| done | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: test-results-shard-${{ matrix.shard }} | |
| path: '**/TestResults/*.trx' | |
| report: | |
| name: "Build & Test" | |
| runs-on: ubuntu-latest | |
| needs: test | |
| if: always() | |
| steps: | |
| - name: Download all test results | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: test-results-shard-* | |
| merge-multiple: true | |
| path: test-results | |
| - name: Check test results | |
| run: | | |
| if [ "${{ needs.test.result }}" != "success" ]; then | |
| echo "::error::One or more test shards failed" | |
| exit 1 | |
| fi | |
| echo "All test shards passed" |