You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have written a script that runs my unit tests and publishes coverage.
When the test fails it generates coverage annotations and in it points of the crash and uncovered lines.
The problem is when tests pass, it generates empty coverage annotations without uncovered lines.
Expected behavior
I would expect that Coverage report annotations would include uncovered lines when "Run tests" step is successful.
Details
name: Unit Testson:
pull_request:
branches:
- develop
- stage
- mainworkflow_dispatch:
jobs:
test:
permissions:
contents: readpull-requests: writechecks: writeruns-on: ubuntu-lateststeps:
- name: Checkout codeuses: actions/checkout@v3
- name: Setup Node.jsuses: actions/setup-node@v2with:
node-version: '>=18.15.0'
- name: Install dependenciesrun: npm ci
- name: Run buildrun: npm run build
- name: Run testsid: test-steprun: npm run test:cicontinue-on-error: true
- name: Display coverageif: always()uses: ArtiomTr/jest-coverage-report-action@v2with:
github-token: ${{ secrets.GITHUB_TOKEN }}coverage-file: report.jsonbase-coverage-file: report.jsonskip-step: allannotations: all
- name: Check test resultsif: steps.test-step.outcome == 'failure'run: exit 1
Screenshot of the result:
The text was updated successfully, but these errors were encountered:
Describe a bug
I have written a script that runs my unit tests and publishes coverage.
When the test fails it generates coverage annotations and in it points of the crash and uncovered lines.
The problem is when tests pass, it generates empty coverage annotations without uncovered lines.
Expected behavior
I would expect that Coverage report annotations would include uncovered lines when "Run tests" step is successful.
Details
Screenshot of the result:
The text was updated successfully, but these errors were encountered: