diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index b67b627..f8b26cc 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -37,10 +37,3 @@ jobs: CC_TEST_REPORTER_ID: 760097cb88b4c685dce427cf94a8e12a5f082774d06b4f4f5daef839ffc07821 with: coverageCommand: npm run lcov - - - name: Coverage annotations - uses: jgillick/test-coverage-annotations@v1 - with: - access-token: ${{ secrets.GITHUB_TOKEN }} - coverage: ./coverage/coverage-summary.json - only-changed-files: true diff --git a/.github/workflows/pr-coverage.yml b/.github/workflows/pr-coverage.yml new file mode 100644 index 0000000..36d2e3e --- /dev/null +++ b/.github/workflows/pr-coverage.yml @@ -0,0 +1,37 @@ +name: Continuous Integration +on: + pull_request: + branches: + - 'main' +permissions: + contents: read + pull-requests: write + +jobs: + coverage_report: + name: Generate coverage report + needs: testing + runs-on: ubuntu-latest + strategy: + matrix: + node-version: 22.x + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + + - name: Setup LCOV + run: npm run lcov + + - name: Report code coverage + uses: zgosalvez/github-actions-report-lcov@v3 + with: + coverage-files: coverage/lcov.*.info + minimum-coverage: 90 + artifact-name: code-coverage-report + github-token: ${{ secrets.GITHUB_TOKEN }} + update-comment: true \ No newline at end of file