From f3ed9674370a969d0f9a88774dd88cc43106a1af Mon Sep 17 00:00:00 2001 From: Joss Sparkes Date: Fri, 2 Sep 2022 12:26:46 +0100 Subject: [PATCH 1/5] Added .codecov.yml config file and turned off max_report_age Signed-off-by: Joss Sparkes --- .github/.codecov.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .github/.codecov.yml diff --git a/.github/.codecov.yml b/.github/.codecov.yml new file mode 100644 index 000000000..8a333e58d --- /dev/null +++ b/.github/.codecov.yml @@ -0,0 +1,2 @@ +codecov: + max_report_age: off From 359b4c8bed07af944dcf3b7c1e837c27f9870160 Mon Sep 17 00:00:00 2001 From: Joss Sparkes Date: Fri, 2 Sep 2022 12:48:49 +0100 Subject: [PATCH 2/5] Removed .codecov.yml and made codeco steps located with unit tests Signed-off-by: Joss Sparkes --- .github/.codecov.yml | 2 -- .github/workflows/test.yml | 32 +++++++++++--------------------- 2 files changed, 11 insertions(+), 23 deletions(-) delete mode 100644 .github/.codecov.yml diff --git a/.github/.codecov.yml b/.github/.codecov.yml deleted file mode 100644 index 8a333e58d..000000000 --- a/.github/.codecov.yml +++ /dev/null @@ -1,2 +0,0 @@ -codecov: - max_report_age: off diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bdef39a09..37d17b8ca 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/code-cov: 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: @@ -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 - From 2e8f2742ab80677172f14f8e55e3e3c8200a57aa Mon Sep 17 00:00:00 2001 From: Joss Sparkes Date: Fri, 2 Sep 2022 12:54:23 +0100 Subject: [PATCH 3/5] Spelling mistake Signed-off-by: Joss Sparkes --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 37d17b8ca..2a7f4e415 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,7 +25,7 @@ env: DOTNET_VERSION: '6.0.x' jobs: - unit-tests/code-cov: + unit-tests-and-codecov: runs-on: ubuntu-latest steps: - name: Checkout repository From bbaff7e56dec1008c9a4a5e54d01aa1135bd99f6 Mon Sep 17 00:00:00 2001 From: Joss Sparkes Date: Fri, 2 Sep 2022 12:57:01 +0100 Subject: [PATCH 4/5] Changed sonarscanners requirements Signed-off-by: Joss Sparkes --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2a7f4e415..b708d4220 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -233,7 +233,7 @@ jobs: sonarscanner: runs-on: ubuntu-latest - needs: unit-tests + needs: unit-test-and-codecov steps: - name: Checkout repository uses: actions/checkout@v3 From eadd9ed47a0f25a95f35df057d4b68e063c254f4 Mon Sep 17 00:00:00 2001 From: Joss Sparkes Date: Fri, 2 Sep 2022 12:58:08 +0100 Subject: [PATCH 5/5] spelling mistake Signed-off-by: Joss Sparkes --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b708d4220..09d8ee719 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -233,7 +233,7 @@ jobs: sonarscanner: runs-on: ubuntu-latest - needs: unit-test-and-codecov + needs: unit-tests-and-codecov steps: - name: Checkout repository uses: actions/checkout@v3