Skip to content

Commit 5025ce3

Browse files
committed
limit runtime for PR-specific mutation testing
1 parent a394b68 commit 5025ce3

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,15 +300,25 @@ jobs:
300300
- name: Exec mutation testing for PR
301301
if: ${{ matrix.mutation == 'true' && github.event.pull_request }}
302302
run: |
303-
cosmic-ray exec cosmic-ray.toml session-vs-master.sqlite
303+
systemd-run --user --scope -p MemoryMax=2G -p MemoryHigh=2G cosmic-ray exec cosmic-ray.toml session-vs-master.sqlite &
304+
cosmic_pid=$!
305+
for i in $(seq 1 10); do
306+
echo $i
307+
for j in $(seq 1 60); do
308+
echo -n .
309+
sleep 1
310+
done
311+
done
312+
kill $cosmic_pid
313+
wait $cosmic_pid || true
304314
- name: Check test coverage for PR
305315
if: ${{ matrix.mutation == 'true' && github.event.pull_request }}
306316
run: |
307317
# remove not-executed results
308318
sqlite3 session-vs-master.sqlite "DELETE from work_results WHERE work_results.worker_outcome = 'SKIPPED'"
309319
cr-report session-vs-master.sqlite | tail -n 5
310-
# check if executed have at most 5% survival rate
311-
cr-rate --fail-over 5 session-vs-master.sqlite
320+
# check if executed have at most 15% survival rate
321+
cr-rate --estimate --confidence 99.9 --fail-over 15 session-vs-master.sqlite
312322
- name: instrumental test coverage on PR
313323
if: ${{ contains(matrix.opt-deps, 'instrumental') && github.event.pull_request }}
314324
env:

0 commit comments

Comments
 (0)