Add comprehensive unit test suite and CI workflow for SafariBooksDownloader #4
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: (PR) SafariBooks Validation | |
| on: | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '9.0.x' | |
| - name: Restore dependencies | |
| run: dotnet restore src/SafariBooksDownloader.sln | |
| - name: Build | |
| run: dotnet build src/SafariBooksDownloader.sln --configuration Release --no-restore | |
| - name: Test | |
| run: dotnet test src/SafariBooksDownloader.sln --configuration Release --no-build --verbosity normal --collect:"XPlat Code Coverage" | |
| - name: Upload coverage reports | |
| uses: codecov/codecov-action@v3 | |
| if: always() | |
| with: | |
| file: "**/coverage.cobertura.xml" | |
| flags: unittests | |
| name: codecov-umbrella | |
| fail_ci_if_error: false |