Bump SonarAnalyzer.CSharp from 10.34.0.3385 to 10.35.0.4138 (#3255) #2133
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: mutation-tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - release/* | |
| pull_request: | |
| workflow_dispatch: | |
| env: | |
| DOTNET_CLI_TELEMETRY_OPTOUT: true | |
| DOTNET_GENERATE_ASPNET_CERTIFICATE: false | |
| DOTNET_NOLOGO: true | |
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
| DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: 1 | |
| NUGET_XMLDOC_MODE: skip | |
| TERM: xterm | |
| permissions: | |
| contents: read | |
| jobs: | |
| mutations: | |
| name: 'mutations-${{ matrix.name }}' | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 60 | |
| # HACK Workaround for https://github.com/stryker-mutator/stryker-net/issues/3094 | |
| env: | |
| MinVerSkip: true | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: core | |
| target: Core | |
| - name: extensions | |
| target: Extensions | |
| - name: legacy | |
| target: Legacy | |
| - name: ratelimiting | |
| target: RateLimiting | |
| - name: testing | |
| target: Testing | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| show-progress: false | |
| - name: Setup .NET SDKs | |
| uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 | |
| with: | |
| dotnet-version: | | |
| 8.0.x | |
| 9.0.x | |
| - name: Setup .NET SDK | |
| uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 | |
| - name: Run mutation tests for ${{ matrix.target }} | |
| shell: pwsh | |
| env: | |
| MUTATION_TARGET: 'MutationTests${{ matrix.target }}' | |
| SKIP_POLLY_ANALYZERS: 'true' | |
| STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} | |
| run: ./build.ps1 -Target ${env:MUTATION_TARGET} | |
| - name: Upload Mutation Report | |
| if: ${{ !cancelled() }} | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: mutation-report-${{ matrix.name }} | |
| path: ./artifacts/mutation-report | |
| mutation-tests: | |
| needs: [ mutations ] | |
| if: ${{ always() }} | |
| runs-on: ubuntu-24.04 | |
| env: | |
| MUTATIONS_SUCCESS: ${{ !contains(needs.*.result, 'failure') }} | |
| STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} | |
| steps: | |
| - run: | | |
| if [ -z "${STRYKER_DASHBOARD_API_KEY}" ] | |
| then | |
| DASHBOARD_URL="https://dashboard.stryker-mutator.io/reports/github.com/${GITHUB_REPOSITORY}/${GITHUB_REF_NAME}" | |
| printf "# Mutations Dashboard\n\n[View report :notebook:](%s)\n" "${DASHBOARD_URL}" >> "${GITHUB_STEP_SUMMARY}" | |
| fi | |
| if [ "$MUTATIONS_SUCCESS" == "true" ] | |
| then | |
| echo "Mutation tests successful ✅" | |
| else | |
| echo "::error title=Mutation Tests::One or more mutation test runs failed ❌" | |
| exit 1 | |
| fi |