Skip to content

Commit e6b2993

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

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,8 @@ jobs:
268268
- name: Install mutation testing dependencies
269269
if: ${{ matrix.mutation == 'true' }}
270270
run: |
271-
pip install https://github.com/sixty-north/cosmic-ray/archive/master.zip
271+
#pip install https://github.com/sixty-north/cosmic-ray/archive/master.zip
272+
pip install https://github.com/tomato42/cosmic-ray/archive/no-executed.zip
272273
pip install pytest-timeout
273274
- name: Display installed python package versions
274275
run: pip list
@@ -329,8 +330,12 @@ jobs:
329330
- name: Check test coverage for PR
330331
if: ${{ matrix.mutation == 'true' && github.event.pull_request }}
331332
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
333+
# only check if we have executed tests (if no code changes, the
334+
# cr-rate will fail)
335+
if ! $( cr-report session-vs-master.sqlite | tail -n 3 | grep -q 'complete.*100.00%' ); then
336+
# check if executed have at most 50% survival rate
337+
cr-rate --estimate --confidence 99.9 --fail-over 50 session-vs-master.sqlite
338+
fi
334339
- name: instrumental test coverage on PR
335340
if: ${{ contains(matrix.opt-deps, 'instrumental') && github.event.pull_request }}
336341
env:
@@ -417,7 +422,8 @@ jobs:
417422
key: sessions-${{ github.sha }}
418423
- name: Install cosmic-ray
419424
run: |
420-
pip3 install https://github.com/sixty-north/cosmic-ray/archive/master.zip
425+
#pip3 install https://github.com/sixty-north/cosmic-ray/archive/master.zip
426+
pip3 install https://github.com/tomato42/cosmic-ray/archive/no-executed.zip
421427
pip install pytest-timeout
422428
- name: Install dependencies
423429
run: |
@@ -493,7 +499,8 @@ jobs:
493499
- name: Install build dependencies
494500
run: |
495501
pip install -r build-requirements.txt
496-
pip install https://github.com/sixty-north/cosmic-ray/archive/master.zip
502+
#pip install https://github.com/sixty-north/cosmic-ray/archive/master.zip
503+
pip install https://github.com/tomato42/cosmic-ray/archive/no-executed.zip
497504
pip install pytest-timeout
498505
- name: Run mutation testing
499506
run: |
@@ -641,7 +648,8 @@ jobs:
641648
key: sessions-${{ github.sha }}-19-done
642649
- name: Install cosmic-ray
643650
run: |
644-
pip3 install https://github.com/sixty-north/cosmic-ray/archive/master.zip
651+
#pip3 install https://github.com/sixty-north/cosmic-ray/archive/master.zip
652+
pip3 install https://github.com/tomato42/cosmic-ray/archive/no-executed.zip
645653
pip install pytest-timeout
646654
- name: Install dependencies
647655
run: |

0 commit comments

Comments
 (0)