Split CI into build gate + parallel test jobs #2211
Workflow file for this run
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: [ "**" ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| environment: Pipeline | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-dotnet@v1 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - run: dotnet build Cleipnir.ResilientFunctions.sln | |
| test: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: Pipeline | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| test-project: | |
| - Core/Cleipnir.ResilientFunctions.Tests | |
| - Stores/MariaDB/Cleipnir.ResilientFunctions.MariaDB.Tests | |
| - Stores/PostgreSQL/Cleipnir.ResilientFunctions.PostgreSQL.Tests | |
| - Stores/SqlServer/Cleipnir.ResilientFunctions.SqlServer.Tests | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-dotnet@v1 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Start containers | |
| run: docker compose -f "docker-compose.yml" up -d --build | |
| - run: dotnet build Cleipnir.ResilientFunctions.sln | |
| - run: dotnet run --project ./Stores/EnsureDatabaseConnections/EnsureDatabaseConnections.csproj | |
| - run: dotnet test ./${{ matrix.test-project }} --no-build --logger "console;verbosity=detailed" | |
| - name: Stop containers | |
| if: always() | |
| run: docker compose -f "docker-compose.yml" down |