Unit tests: PDF to PNG conversion: remove alpha channel #185
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: Continuous Integration | |
| on: [push, pull_request] | |
| env: | |
| Configuration: Release | |
| ContinuousIntegrationBuild: true | |
| DOTNET_CLI_TELEMETRY_OPTOUT: true | |
| DOTNET_NOLOGO: true | |
| DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: true | |
| TERM: xterm-256color | |
| jobs: | |
| package: | |
| strategy: | |
| matrix: | |
| os: [ macos-latest, ubuntu-latest, windows-latest ] | |
| fail-fast: false | |
| runs-on: ${{ matrix.os }} | |
| name: Build and run tests | |
| steps: | |
| - name: Checkout git repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: | | |
| 8.x | |
| 10.x | |
| - name: Restore NuGet packages | |
| run: dotnet restore | |
| - name: Build solution | |
| run: dotnet build --no-restore --verbosity normal | |
| - name: Run tests | |
| run: dotnet test --no-build --verbosity normal | |
| - name: Upload received files from failing tests | |
| uses: actions/upload-artifact@v7 | |
| if: failure() | |
| with: | |
| name: Received-${{ runner.os }} | |
| path: "**/*.received.*" | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v7 | |
| if: always() | |
| with: | |
| name: TestResults-${{ runner.os }} | |
| path: TestResults-*.html | |
| - name: Create and validate NuGet packages | |
| run: | | |
| dotnet tool restore | |
| dotnet pack --no-build --verbosity normal | |
| if: startsWith(matrix.os,'windows') | |
| - name: Generate API documentation | |
| run: | | |
| dotnet tool restore | |
| dotnet docfx docfx/docfx.json --warningsAsErrors | |
| if: startsWith(matrix.os,'windows') | |
| - name: Cache SonarCloud packages | |
| if: startsWith(matrix.os,'windows') | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~\.sonar\cache | |
| key: ${{ runner.os }}-sonar | |
| restore-keys: ${{ runner.os }}-sonar | |
| - name: Cache SonarCloud scanner | |
| if: startsWith(matrix.os,'windows') | |
| id: cache-sonar-scanner | |
| uses: actions/cache@v5 | |
| with: | |
| path: .\.sonar\scanner | |
| key: ${{ runner.os }}-sonar-scanner | |
| restore-keys: ${{ runner.os }}-sonar-scanner | |
| - name: Install SonarCloud scanner | |
| if: startsWith(matrix.os,'windows') && steps.cache-sonar-scanner.outputs.cache-hit != 'true' | |
| shell: powershell | |
| run: | | |
| New-Item -Path .\.sonar\scanner -ItemType Directory | |
| dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner | |
| - name: Cache dotnet-coverage | |
| if: startsWith(matrix.os,'windows') | |
| id: cache-dotnet-coverage | |
| uses: actions/cache@v5 | |
| with: | |
| path: .\.dotnet-coverage | |
| key: ${{ runner.os }}-dotnet-coverage | |
| restore-keys: ${{ runner.os }}-dotnet-coverage | |
| - name: Install dotnet-coverage | |
| if: startsWith(matrix.os,'windows') && steps.cache-dotnet-coverage.outputs.cache-hit != 'true' | |
| shell: powershell | |
| run: | | |
| New-Item -Path .\.dotnet-coverage -ItemType Directory | |
| dotnet tool update dotnet-coverage --tool-path .\.dotnet-coverage | |
| - name: Build and analyze | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| if: startsWith(matrix.os,'windows') && env.SONAR_TOKEN != '' | |
| shell: powershell | |
| run: | | |
| dotnet clean | |
| .\.sonar\scanner\dotnet-sonarscanner begin /k:"manuelbl_SwissQRBill.NET" /o:"manuelbl-github" /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml /d:sonar.cpd.exclusions=**/EmbeddedFonts.* | |
| dotnet build --no-incremental | |
| .\.dotnet-coverage\dotnet-coverage collect "dotnet test" -f xml -o "coverage.xml" | |
| .\.sonar\scanner\dotnet-sonarscanner end |