Commit 9f24c9b 1 parent 1631680 commit 9f24c9b Copy full SHA for 9f24c9b
File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,9 @@ name: Coverage check on main push
2
2
3
3
on : [push]
4
4
5
+ env :
6
+ COVERAGE_SENSITIVITY_PERCENT : 1
7
+
5
8
jobs :
6
9
upload-coverage :
7
10
runs-on : ubuntu-latest
@@ -31,13 +34,13 @@ jobs:
31
34
uses : hrishikesh-kadam/setup-lcov@v1
32
35
33
36
- name : Filter directories
34
- run : lcov --remove lcov.info 'test/*' 'script/*' --output-file lcov .info --rc branch_coverage =1 --rc derive_function_end_line=0
37
+ run : lcov --remove lcov.info 'test/*' 'script/*' --output-file lcovNew .info --rc lcov_branch_coverage =1 --rc derive_function_end_line=0 --ignore-errors unused
35
38
36
39
- name : Capture coverage output
37
40
id : new-coverage
38
41
uses : zgosalvez/github-actions-report-lcov@v3
39
42
with :
40
- coverage-files : lcov .info
43
+ coverage-files : lcovNew .info
41
44
42
45
- name : Retrieve previous coverage
43
46
uses : actions/download-artifact@v2
@@ -56,11 +59,12 @@ jobs:
56
59
- name : Compare previous coverage
57
60
run : |
58
61
old=$(cat coverage.info)
59
- new=${{ steps.new-coverage.outputs.total-coverage }}
62
+ new=$(( $ {{ steps.new-coverage.outputs.total-coverage }} + ${{ env.COVERAGE_SENSITIVITY_PERCENT }} ))
60
63
if [ "$new" -lt "$old" ]; then
61
64
echo "Coverage decreased from $old to $new"
62
65
exit 1
63
66
fi
67
+ mv lcovNew.info coverage.info
64
68
65
69
- name : Upload the new coverage
66
70
uses : actions/upload-artifact@v2
You can’t perform that action at this time.
0 commit comments