diff --git a/.github/workflows/everything.yml b/.github/workflows/everything.yml index d1fcd01..6b02ce5 100644 --- a/.github/workflows/everything.yml +++ b/.github/workflows/everything.yml @@ -34,12 +34,19 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v2 + with: + fetch-depth: 0 - name: Restore Tools working-directory: ./test run: dotnet tool restore - name: Run mutation tests working-directory: ./test - run: dotnet stryker --reporter "dashboard" --dashboard-api-key ${{ secrets.STRYKER_DASHBOARD_API_KEY }} + run: dotnet stryker --reporter dashboard --with-baseline:${{ github.base_ref }} --dashboard-api-key ${{ secrets.STRYKER_DASHBOARD_API_KEY }} --version ${{ github.head_ref }} + if: github.event_name == 'pull_request' + - name: Run mutation tests + working-directory: ./test + run: dotnet stryker --reporter dashboard --dashboard-api-key ${{ secrets.STRYKER_DASHBOARD_API_KEY }} --version ${{ github.ref_name }} + if: github.event_name != 'pull_request' package: needs: test runs-on: ubuntu-latest diff --git a/AuthOida.sln b/AuthOida.sln index 5626e97..ba68317 100644 --- a/AuthOida.sln +++ b/AuthOida.sln @@ -26,6 +26,7 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{04AFCA1B-D813-4E6E-AC58-A485B03B151E}" ProjectSection(SolutionItems) = preProject test\Directory.Build.props = test\Directory.Build.props + test\stryker-config.json = test\stryker-config.json test\test.runsettings = test\test.runsettings EndProjectSection EndProject diff --git a/test/stryker-config.json b/test/stryker-config.json index d23e31d..021a0e5 100644 --- a/test/stryker-config.json +++ b/test/stryker-config.json @@ -3,6 +3,9 @@ "test-projects": [ "AuthOida.Microsoft.Identity.Groups.Tests/AuthOida.Microsoft.Identity.Groups.Tests.csproj" ], "ignore-methods": [ "ConfigureAwait" // Ignores mutations of ConfigureAwait(false) - ] + ], + "baseline": { + "provider": "Dashboard" + } } } \ No newline at end of file