Skip to content

Commit

Permalink
Merge Coverage Reports Using lcov-result-merger
Browse files Browse the repository at this point in the history
  • Loading branch information
prayanshchh committed Nov 26, 2024
1 parent ab6d03d commit 6214b2f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 31 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,7 @@ jobs:
- name: Merge Coverage Reports
if: steps.changed-files.outputs.only_changed != 'true'
run: |
mkdir -p ./coverage
npx nyc merge ./.nyc_output || exit 1
mv coverage.json ./coverage/lcov.info
npx lcov-result-merger 'coverage/*/lcov.info' > 'coverage/lcov.info'
- name: TypeScript compilation for changed files
run: |
Expand All @@ -228,14 +226,15 @@ jobs:
npx tsc --noEmit "$file"
fi
done
- name: Present and Upload coverage to Codecov as ${{env.CODECOV_UNIQUE_NAME}}
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
fail_ci_if_error: false
files: './coverage/lcov.info'
name: '${{env.CODECOV_UNIQUE_NAME}}'
fail_ci_if_error: false

- name: Test acceptable level of code coverage
uses: VeryGoodOpenSource/very_good_coverage@v2
Expand Down
41 changes: 16 additions & 25 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"i18next-http-backend": "^2.6.1",
"inquirer": "^8.0.0",
"js-cookie": "^3.0.1",
"lcov-result-merger": "^5.0.1",
"markdown-toc": "^1.2.0",
"prettier": "^3.3.3",
"prop-types": "^15.8.1",
Expand Down

0 comments on commit 6214b2f

Please sign in to comment.