Skip to content

Commit

Permalink
fix: failing workflow run because of missing lcov.info file
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberCitizen01 committed Jan 23, 2024
1 parent b5f00a1 commit e40cfce
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,24 @@ jobs:
run: |
npm run test-coverage-ci || echo "Silently ignoring coverage threshold limit..."
- name: Check if a valid lcov.info file is generated
id: check-lcov-non-empty
run: |
if [ -s "./coverage/lcov.info" ]; then
echo "lcov.info is not empty."
echo "::set-output name=isNotEmpty::true"
else
echo "lcov.info is empty."
echo "::set-output name=isNotEmpty::false"
fi
- name: Install LCOV
if: ${{ steps.check-lcov-non-empty.outputs.isNotEmpty == 'true'}}
run: |
sudo apt-get update && sudo apt-get install --assume-yes lcov
- name: Report code coverage
if: ${{ steps.check-lcov-non-empty.outputs.isNotEmpty == 'true' }}
uses: zgosalvez/github-actions-report-lcov@v3
with:
coverage-files: ./coverage/lcov.info
Expand Down

0 comments on commit e40cfce

Please sign in to comment.