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 4392731
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,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 +421,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

0 comments on commit 4392731

Please sign in to comment.