diff --git a/.github/codecov.yml b/.github/codecov.yml deleted file mode 100644 index bfdc9877d9a..00000000000 --- a/.github/codecov.yml +++ /dev/null @@ -1,8 +0,0 @@ -coverage: - status: - project: - default: - informational: true - patch: - default: - informational: true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 87c60fafa8b..9878fb541a7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -303,6 +303,9 @@ jobs: name: Upload Coverage needs: library-tests runs-on: ubuntu-latest + permissions: + contents: read + code-quality: write steps: - name: Download all coverage artifacts uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 @@ -310,16 +313,30 @@ jobs: path: ./output/download pattern: coverage-* - - name: Upload coverage to Codecov - uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 + - name: Install .NET + uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0 + with: + dotnet-version: 10.x + + - name: Install dotnet-coverage + run: | + dotnet tool install --global dotnet-coverage --version 18.8.0 + echo "$HOME/.dotnet/tools" >> "$GITHUB_PATH" + + - name: Merge coverage reports + run: > + dotnet-coverage merge + --output ./output/merged.cobertura.xml + --output-format cobertura + "./output/download/**/*.cobertura.xml" + + - name: Upload coverage to GitHub + uses: actions/upload-code-coverage@abb5995db9e0199b0e2bb9dbd136fce4cb1ec4d3 # v1 timeout-minutes: 10 with: - token: ${{ secrets.CODECOV_TOKEN }} - name: graphql-platform - files: "./output/download/coverage-*/*.cobertura.xml" - disable_search: true - flags: unittests - fail_ci_if_error: true + file: ./output/merged.cobertura.xml + language: "C#" + label: code-coverage/dotnet validate-nitro-client: name: Validate Nitro Client diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 22e8d902013..e4cc5039fba 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -115,6 +115,9 @@ jobs: name: Upload Coverage needs: library-tests runs-on: ubuntu-latest + permissions: + contents: read + code-quality: write steps: - name: Download all coverage artifacts uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 @@ -122,13 +125,27 @@ jobs: path: ./output/download pattern: coverage-* - - name: Upload coverage to Codecov - uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 + - name: Install .NET + uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0 + with: + dotnet-version: 10.x + + - name: Install dotnet-coverage + run: | + dotnet tool install --global dotnet-coverage --version 18.8.0 + echo "$HOME/.dotnet/tools" >> "$GITHUB_PATH" + + - name: Merge coverage reports + run: > + dotnet-coverage merge + --output ./output/merged.cobertura.xml + --output-format cobertura + "./output/download/**/*.cobertura.xml" + + - name: Upload coverage to GitHub + uses: actions/upload-code-coverage@abb5995db9e0199b0e2bb9dbd136fce4cb1ec4d3 # v1 timeout-minutes: 10 with: - token: ${{ secrets.CODECOV_TOKEN }} - name: graphql-platform - files: "./output/download/coverage-*/*.cobertura.xml" - disable_search: true - flags: unittests - fail_ci_if_error: true + file: ./output/merged.cobertura.xml + language: "C#" + label: code-coverage/dotnet