Skip to content

Commit

Permalink
fix: comment on PR irrespective of test step
Browse files Browse the repository at this point in the history
- Gracefully test, comment on PR and exit if test exits with non-zero error code
  • Loading branch information
CyberCitizen01 authored and coopernetes committed Oct 21, 2023
1 parent d79a4a1 commit 0023399
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,17 @@ jobs:
run: npm i

- name: Test
run: npm run test-coverage-ci
id: test
run: |
npm run test-coverage-ci || echo "exit_code=$?\n" >> $GITHUB_OUTPUT
- name: Comment test coverage report on PR
uses: romeovs/[email protected]
with:
lcov-file: ./coverage/lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Exit if coverage condition not met
if: ${{ steps.test.outputs.exit_code }} != 0
run: exit ${{ steps.test.outputs.exit_code }}

0 comments on commit 0023399

Please sign in to comment.