jest-coverage-report-action
jest-coverage-report-action copied to clipboard
Unchanged files with check annotations (beta)
Describe a bug
I'm unable to prevent coverage annotation on unchanged files. I've setup the action with annotations: coverage
and expected to have annotations to changed files only, as stated in the docs:
coverage - Will annotate those sections of your code that test did not cover. Limited to changed lines when used on a Pull Request
Even so, GH is adding a entire section on the diff entitled "Unchanged files with check annotations (beta)" with a bunch of annotations.
As we are starting a long effort of covering a huge legacy application with tests, this is becoming an issue due to the extensive number of files without coverage.
I see this should be addressed already, per this closed issue, but it's not working for me.
Expected behavior
To have coverage annotations on changed files only (changed lines if possible).
Details
-
Action version: v2.2.4
-
OS, where your action is running (windows, linux): linux (ubuntu)
-
action.yml file
```yml name: Build and Test on: workflow_call: secrets: ... ... jobs: build-and-test: ... - name: Test id: test run: npm run test:coverage:ci # jest --verbose --ci --coverage --json --testLocationInResults --outputFile=report.json - name: Find Current Pull Request id: findPr uses: jwalton/[email protected] - name: Report Test Coverage uses: ArtiomTr/[email protected] with: prnumber: ${{ steps.findPr.outputs.number }} annotations: coverage coverage-file: report.json base-coverage-file: report.json ```
-
Screenshots
Additional context
Hello @VictorComette, can you please provide minimal reproducible example of this issue? If not, maybe you can email your report.json
file as well as PR diff to [email protected]
?
I'm seeing this issue using the recommended default setup for this action on v2.3