Enhance CI/CD with parallel test execution across multiple frameworks #161
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: .NET CI | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request_target: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: | | |
| 6.0.x | |
| 8.0.x | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build --no-restore | |
| test: | |
| needs: build | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| - framework: net8.0 | |
| os: ubuntu-latest | |
| - framework: net6.0 | |
| os: ubuntu-latest | |
| - framework: net481 | |
| os: windows-latest | |
| - framework: net462 | |
| os: windows-latest | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: | | |
| 6.0.x | |
| 8.0.x | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build --no-restore | |
| - name: Test ${{ matrix.framework }} | |
| run: dotnet test --no-build --verbosity normal --framework ${{ matrix.framework }} | |
| env: | |
| GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} |