Skip to content

Commit

Permalink
fix: coverage action
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-something committed May 18, 2024
1 parent 35351b3 commit a2a98b9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/coverage_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ jobs:
run: lcov --remove lcov.info 'test/*' 'script/*' --output-file lcov.info --rc branch_coverage=1 --rc derive_function_end_line=0

- name: Capture coverage output
id: capture-coverage
run: |
COVERAGE_OUTPUT=$(zgosalvez/github-actions-report-lcov@v3 --coverage-files lcov.info)
echo "new_coverage=$COVERAGE_OUTPUT" >> $GITHUB_ENV
id: new-coverage
uses: zgosalvez/github-actions-report-lcov@v3
with:
coverage-files: lcov.info

- name: Retrieve previous coverage
uses: actions/download-artifact@v2
Expand All @@ -56,7 +56,7 @@ jobs:
- name: Compare previous coverage
run: |
old=$(cat coverage.info)
new=$(echo $COVERAGE_OUTPUT)
new=${{ steps.new-coverage.outputs.total-coverage }}
if [ "$new" -lt "$old" ]; then
echo "Coverage decreased from $old to $new"
exit 1
Expand Down

0 comments on commit a2a98b9

Please sign in to comment.