diff --git a/.github/workflows/pr-builder.yml b/.github/workflows/pr-builder.yml index 393767a1222..aa72bb5b5d0 100644 --- a/.github/workflows/pr-builder.yml +++ b/.github/workflows/pr-builder.yml @@ -190,19 +190,14 @@ jobs: run: pnpm build:modules - name: 🃏 Run Jest & Collect Coverage - id: run-jest-test-and-coverage - # TODO: Update the command to "test:unit:coverage" once the coverage command related issues - # are sorted out + id: run-jest-tests run: pnpm test:unit - - name: 🤖 Aggregate Test Coverage - # TODO: Enable this step once the coverage command related issues are fixed - if: false - id: aggregate-coverage-reports - run: | - pnpm test:unit:coverage:aggregate - pnpm nyc:text-summary-report - pnpm nyc:text-report + - name: Upload coverage reports to Codecov + id: collect-and-upload-coverage + uses: codecov/codecov-action@v4.0.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} build: name: 🚧 Build diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 00000000000..eed03af60b4 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,15 @@ +codecov: + require_ci_to_pass: yes + notify: + wait_for_ci: yes +coverage: + status: + project: # checks the effect for the overall code coverage rate of the repository. + default: + enabled: yes + threshold: null + target: auto + patch: # This status indicates the extent of code coverage achieved by the pull request. + default: + target: 80% + threshold: 50% # With a target of 80% and a threshold of 50%, the acceptable coverage range is 50% to 80%.