diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bdef39a09..09d8ee719 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,7 +25,7 @@ env: DOTNET_VERSION: '6.0.x' jobs: - unit-tests: + unit-tests-and-codecov: runs-on: ubuntu-latest steps: - name: Checkout repository @@ -61,6 +61,16 @@ jobs: --collect:"XPlat Code Coverage" --settings "./coverlet.runsettings" working-directory: ./tests + - name: Run CodeCov analysis + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: "**/coverage.opencover.xml" + flags: unittests + name: codecov-umbrella + fail_ci_if_error: true + verbose: true + - name: Archive code coverage results uses: actions/upload-artifact@v3 with: @@ -223,7 +233,7 @@ jobs: sonarscanner: runs-on: ubuntu-latest - needs: unit-tests + needs: unit-tests-and-codecov steps: - name: Checkout repository uses: actions/checkout@v3 @@ -273,23 +283,3 @@ jobs: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} run: dotnet sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}" working-directory: ./src - - codecov: - runs-on: ubuntu-latest - needs: unit-tests - steps: - - name: Download code coverage from unit tests - uses: actions/download-artifact@v3 - with: - name: code-coverage-reports - - - name: Run CodeCov analysis - uses: codecov/codecov-action@v3 - with: - token: ${{ secrets.CODECOV_TOKEN }} - files: "**/coverage.opencover.xml" - flags: unittests - name: codecov-umbrella - fail_ci_if_error: true - verbose: true -