build(deps): bump Microsoft.AspNetCore.OpenApi from 9.0.2 to 9.0.4 in /tests/DemoApi.Tests #34
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: Test all (on all branches) | |
| on: [push, pull_request] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up dotnet | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '9.0.x' | |
| - name: Cache NuGet packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ github.workspace }}/.nuget/packages | |
| key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}-${{ hashFiles('**/global.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-nuget- | |
| - name: dotnet restore | |
| run: dotnet restore | |
| - name: dotnet build | |
| run: | | |
| dotnet build --no-restore | |
| echo "dotnet build done" | |
| - name: dotnet test | |
| # run: dotnet test --no-build --verbosity normal | |
| run: > | |
| dotnet test | |
| --configuration Release | |
| --logger GitHubActions | |
| -- | |
| RunConfiguration.CollectSourceInformation=true | |
| - name: Comment on PR with coverage | |
| if: ${{ github.event_name == 'pull_request' }} | |
| run: echo "Test coverage 99%" | |
| # uses: actions/github-script@v7 | |
| # script: | | |
| # ... | |
| # send comment to pull request |