test: update DownloadServiceTest to handle bad URL scenarios and adju… #630
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: Ubuntu x64 | |
| on: [ push ] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| environment: Linux | |
| strategy: | |
| matrix: | |
| dotnet-version: [ 9.0.x ] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET Core | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ matrix.dotnet-version }} | |
| - name: Restore dependencies | |
| run: dotnet restore ./src | |
| - name: Build solution | |
| run: dotnet build -c Release ./src --verbosity minimal | |
| - name: Run tests and collect coverage | |
| run: | | |
| dotnet test -c Release ./src --verbosity normal --no-build --no-restore \ | |
| --collect:"XPlat Code Coverage" --results-directory ./TestResults/ \ | |
| /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura \ | |
| /p:CoverletOutput=./TestResults/coverage.cobertura.xml | |
| - name: List files in TestResults directory | |
| run: ls -R ./TestResults | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./TestResults/**/coverage.cobertura.xml | |
| flags: unit | |
| name: codecov-umbrella | |
| fail_ci_if_error: false | |
| verbose: true |