Bump Testcontainers from 4.10.0 to 4.11.0 #1585
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
| # For details of what checks are run for PRs please refer below | |
| name: .NET Core CI | |
| permissions: read-all | |
| on: [pull_request, workflow_dispatch] | |
| jobs: | |
| # Fail if there are build warnings | |
| # | |
| # As a general code quality check we use FxCop analyzers. | |
| # | |
| # To check for build warnings locally you may need to run a clean build. | |
| # | |
| # This can be done by running `dotnet clean` before running `dotnet build` | |
| build-warnings: | |
| name: Build warnings check | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup dotnet | |
| uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0 | |
| with: | |
| dotnet-version: | | |
| 9.x | |
| 10.x | |
| - name: Locked restore | |
| run: dotnet restore --locked-mode | |
| - name: Build | |
| run: dotnet build /WarnAsError --no-restore | |
| # Fail if there are any failed tests | |
| # | |
| # We support all current LTS versions of .NET Core and Windows, Mac and Linux. | |
| # | |
| # To check for failing tests locally run `dotnet test`. | |
| # | |
| # Although you can build previous versions of .NET Core projects with the | |
| # latest SDK you can't run them. So to run tests for all target versions you | |
| # will need all current LTS version runtimes installed. | |
| # | |
| # If installing all required runtimes is problematic you can specify a | |
| # particular version like this `dotnet test --framework netcoreapp2.1`. | |
| test: | |
| name: Tests for .net core ${{ matrix.framework }} on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| framework: ['net8.0', 'net9.0', 'net10.0'] | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup dotnet 10 | |
| uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0 | |
| with: | |
| dotnet-version: '10.x' | |
| - name: Setup dotnet 9 | |
| uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0 | |
| with: | |
| dotnet-version: '9.x' | |
| - name: Setup dotnet 8 | |
| uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0 | |
| with: | |
| dotnet-version: '8.x' | |
| - name: Tests | |
| run: dotnet test CycloneDX.Tests --framework ${{ matrix.framework }} --collect:"XPlat Code Coverage;Format=cobertura" --results-directory "TestResults" | |
| # see https://github.com/danielpalme/ReportGenerator/blob/main/.github/workflows/ci.yml | |
| - name: ReportGenerator | |
| uses: danielpalme/ReportGenerator-GitHub-Action@ee0ae774f6d3afedcbd1683c1ab21b83670bdf8e # v5.5.1 | |
| with: | |
| reports: 'TestResults/**/coverage.cobertura.xml' | |
| targetdir: 'coveragereport' | |
| reporttypes: 'HtmlInline;Cobertura;MarkdownSummaryGithub' | |
| # Error: Resource not accessible by integration => permission issue | |
| # - name: Add Coverage PR Comment | |
| # uses: marocchino/sticky-pull-request-comment@v2 | |
| # if: github.event_name == 'pull_request' | |
| # with: | |
| # recreate: true | |
| # path: ./coveragereport/SummaryGithub.md | |
| - name: Write to Job Summary | |
| run: cat ./coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY | |
| shell: bash | |
| - name: Upload coverage report artifact | |
| if: ${{ matrix.os == 'ubuntu-latest' && matrix.framework == 'net10.0' }} | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: CoverageReport_${{ matrix.framework }}_${{ matrix.os }} | |
| path: coveragereport | |
| # E2E tests require Docker (Testcontainers) and only target net10.0. | |
| # Run exclusively on ubuntu-latest where Docker is available on the runner. | |
| e2e-test: | |
| name: E2E Tests (ubuntu-latest, net10.0) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup dotnet 10 | |
| uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0 | |
| with: | |
| dotnet-version: '10.x' | |
| - name: Locked restore | |
| run: dotnet restore --locked-mode | |
| - name: E2E Tests | |
| run: dotnet test CycloneDX.E2ETests --framework net10.0 --results-directory "TestResults" |