Skip to content

Commit 4392731

Browse files
committed
don't check rate if no tests executed
1 parent c56030e commit 4392731

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/ci.yml

+8-3
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,12 @@ jobs:
329329
- name: Check test coverage for PR
330330
if: ${{ matrix.mutation == 'true' && github.event.pull_request }}
331331
run: |
332-
# check if executed have at most 50% survival rate
333-
cr-rate --estimate --confidence 99.9 --fail-over 50 session-vs-master.sqlite
332+
# only check if we have executed tests (if no code changes, the
333+
# cr-rate will fail)
334+
if ! $( cr-report session-vs-master.sqlite | tail -n 3 | grep -q 'complete.*100.00%' ); then
335+
# check if executed have at most 50% survival rate
336+
cr-rate --estimate --confidence 99.9 --fail-over 50 session-vs-master.sqlite
337+
fi
334338
- name: instrumental test coverage on PR
335339
if: ${{ contains(matrix.opt-deps, 'instrumental') && github.event.pull_request }}
336340
env:
@@ -417,7 +421,8 @@ jobs:
417421
key: sessions-${{ github.sha }}
418422
- name: Install cosmic-ray
419423
run: |
420-
pip3 install https://github.com/sixty-north/cosmic-ray/archive/master.zip
424+
#pip3 install https://github.com/sixty-north/cosmic-ray/archive/master.zip
425+
pip3 install https://github.com/tomato42/cosmic-ray/archive/no-executed.zip
421426
pip install pytest-timeout
422427
- name: Install dependencies
423428
run: |

0 commit comments

Comments
 (0)