Skip to content

Commit

Permalink
don't check rate if no tests executed
Browse files Browse the repository at this point in the history
  • Loading branch information
tomato42 committed Apr 8, 2024
1 parent c56030e commit e6b2993
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,8 @@ jobs:
- name: Install mutation testing dependencies
if: ${{ matrix.mutation == 'true' }}
run: |
pip install https://github.com/sixty-north/cosmic-ray/archive/master.zip
#pip install https://github.com/sixty-north/cosmic-ray/archive/master.zip
pip install https://github.com/tomato42/cosmic-ray/archive/no-executed.zip
pip install pytest-timeout
- name: Display installed python package versions
run: pip list
Expand Down Expand Up @@ -329,8 +330,12 @@ jobs:
- name: Check test coverage for PR
if: ${{ matrix.mutation == 'true' && github.event.pull_request }}
run: |
# check if executed have at most 50% survival rate
cr-rate --estimate --confidence 99.9 --fail-over 50 session-vs-master.sqlite
# only check if we have executed tests (if no code changes, the
# cr-rate will fail)
if ! $( cr-report session-vs-master.sqlite | tail -n 3 | grep -q 'complete.*100.00%' ); then
# check if executed have at most 50% survival rate
cr-rate --estimate --confidence 99.9 --fail-over 50 session-vs-master.sqlite
fi
- name: instrumental test coverage on PR
if: ${{ contains(matrix.opt-deps, 'instrumental') && github.event.pull_request }}
env:
Expand Down Expand Up @@ -417,7 +422,8 @@ jobs:
key: sessions-${{ github.sha }}
- name: Install cosmic-ray
run: |
pip3 install https://github.com/sixty-north/cosmic-ray/archive/master.zip
#pip3 install https://github.com/sixty-north/cosmic-ray/archive/master.zip
pip3 install https://github.com/tomato42/cosmic-ray/archive/no-executed.zip
pip install pytest-timeout
- name: Install dependencies
run: |
Expand Down Expand Up @@ -493,7 +499,8 @@ jobs:
- name: Install build dependencies
run: |
pip install -r build-requirements.txt
pip install https://github.com/sixty-north/cosmic-ray/archive/master.zip
#pip install https://github.com/sixty-north/cosmic-ray/archive/master.zip
pip install https://github.com/tomato42/cosmic-ray/archive/no-executed.zip
pip install pytest-timeout
- name: Run mutation testing
run: |
Expand Down Expand Up @@ -641,7 +648,8 @@ jobs:
key: sessions-${{ github.sha }}-19-done
- name: Install cosmic-ray
run: |
pip3 install https://github.com/sixty-north/cosmic-ray/archive/master.zip
#pip3 install https://github.com/sixty-north/cosmic-ray/archive/master.zip
pip3 install https://github.com/tomato42/cosmic-ray/archive/no-executed.zip
pip install pytest-timeout
- name: Install dependencies
run: |
Expand Down

0 comments on commit e6b2993

Please sign in to comment.