Skip to content

Commit 53af664

Browse files
cdeckerclaude
andcommitted
CI: consolidate GLOBAL_PYTEST_OPTS into PYTEST_OPTS_BASE.
Replaces GLOBAL_PYTEST_OPTS with PYTEST_OPTS_BASE that includes all common pytest options: --reruns=10, -vvv, --junit-xml=report.xml, --timeout=1800, and --durations=10. Removes redundant option specifications from individual jobs and simplifies pytest command invocations by removing direct references to GLOBAL_PYTEST_OPTS (now inherited via PYTEST_OPTS). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Changelog-None
1 parent b270d91 commit 53af664

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

.github/workflows/ci.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ env:
1616
RUST_PROFILE: release
1717
SLOW_MACHINE: 1
1818
CI_SERVER_URL: "http://35.239.136.52:3170"
19-
GLOBAL_PYTEST_OPTS: "--reruns=10 -vvv"
19+
PYTEST_OPTS_BASE: "--reruns=10 -vvv --junit-xml=report.xml --timeout=1800 --durations=10"
2020

2121
jobs:
2222
prebuild:
@@ -90,7 +90,7 @@ jobs:
9090
- name: Check source
9191
env:
9292
VALGRIND: 0
93-
PYTEST_OPTS: --timeout=1200 --durations=10
93+
PYTEST_OPTS: ${{ env.PYTEST_OPTS_BASE }}
9494
run: |
9595
uv run make check-source BASE_REF="origin/${{ github.base_ref }}"
9696
- name: Check Generated Files have been updated
@@ -314,15 +314,15 @@ jobs:
314314
run: |
315315
env
316316
cat config.vars
317-
uv run eatmydata pytest tests/test_downgrade.py ${GLOBAL_PYTEST_OPTS} -n ${PYTEST_PAR} ${PYTEST_OPTS}
317+
uv run eatmydata pytest tests/test_downgrade.py -n ${PYTEST_PAR} ${PYTEST_OPTS}
318318
319319
integration:
320320
name: Test CLN ${{ matrix.name }}
321321
runs-on: ubuntu-22.04
322322
timeout-minutes: 120
323323
env:
324324
RUST_PROFILE: release # Has to match the one in the compile step
325-
PYTEST_OPTS: --timeout=1200 --durations=10
325+
PYTEST_OPTS: ${{ env.PYTEST_OPTS_BASE }}
326326
needs:
327327
- compile
328328
strategy:
@@ -422,7 +422,7 @@ jobs:
422422
run: |
423423
env
424424
cat config.vars
425-
VALGRIND=0 uv run eatmydata pytest tests/ -vvv ${GLOBAL_PYTEST_OPTS} -n ${PYTEST_PAR} ${PYTEST_OPTS}
425+
VALGRIND=0 uv run eatmydata pytest tests/ -n ${PYTEST_PAR} ${PYTEST_OPTS}
426426
427427
integration-valgrind:
428428
name: Valgrind Test CLN ${{ matrix.name }}
@@ -431,7 +431,7 @@ jobs:
431431
env:
432432
RUST_PROFILE: release # Has to match the one in the compile step
433433
CFG: compile-gcc
434-
PYTEST_OPTS: --test-group-random-seed=42 --timeout=1800 --durations=10 --reruns=10
434+
PYTEST_OPTS: ${{ env.PYTEST_OPTS_BASE }} --test-group-random-seed=42
435435
needs:
436436
- compile
437437
strategy:
@@ -492,7 +492,7 @@ jobs:
492492
SLOW_MACHINE: 1
493493
TEST_DEBUG: 1
494494
run: |
495-
VALGRIND=1 uv run eatmydata pytest tests/ ${GLOBAL_PYTEST_OPTS} -n 3 ${PYTEST_OPTS} ${{ matrix.PYTEST_OPTS }}
495+
VALGRIND=1 uv run eatmydata pytest tests/ -n 3 ${PYTEST_OPTS} ${{ matrix.PYTEST_OPTS }}
496496
497497
integration-sanitizers:
498498
name: Sanitizers Test CLN
@@ -502,7 +502,7 @@ jobs:
502502
RUST_PROFILE: release
503503
SLOW_MACHINE: 1
504504
TEST_DEBUG: 1
505-
PYTEST_OPTS: --test-group-random-seed=42 --timeout=1800 --durations=10 --reruns=10
505+
PYTEST_OPTS: ${{ env.PYTEST_OPTS_BASE }} --test-group-random-seed=42
506506
needs:
507507
- compile
508508
strategy:
@@ -562,7 +562,7 @@ jobs:
562562

563563
- name: Test
564564
run: |
565-
uv run eatmydata pytest tests/ ${GLOBAL_PYTEST_OPTS} -n 2 ${PYTEST_OPTS} ${{ matrix.PYTEST_OPTS }}
565+
uv run eatmydata pytest tests/ -n 2 ${PYTEST_OPTS} ${{ matrix.PYTEST_OPTS }}
566566
567567
update-docs-examples:
568568
name: Update examples in doc schemas (disabled temporarily!)
@@ -574,7 +574,7 @@ jobs:
574574
env:
575575
VALGRIND: 0
576576
GENERATE_EXAMPLES: 1
577-
PYTEST_OPTS: --timeout=1200 --durations=10
577+
PYTEST_OPTS: ${{ env.PYTEST_OPTS_BASE }}
578578
TEST_NETWORK: regtest
579579
needs:
580580
- compile
@@ -613,7 +613,7 @@ jobs:
613613
timeout-minutes: 120
614614
env:
615615
RUST_PROFILE: release # Has to match the one in the compile step
616-
PYTEST_OPTS: --timeout=1200 --durations=10
616+
PYTEST_OPTS: ${{ env.PYTEST_OPTS_BASE }}
617617
needs:
618618
- compile
619619
strategy:
@@ -679,7 +679,7 @@ jobs:
679679
run: |
680680
env
681681
cat config.vars
682-
VALGRIND=0 uv run eatmydata pytest tests/ ${GLOBAL_PYTEST_OPTS} -n ${PYTEST_PAR} ${PYTEST_OPTS}
682+
VALGRIND=0 uv run eatmydata pytest tests/ -n ${PYTEST_PAR} ${PYTEST_OPTS}
683683
684684
685685
gather:

0 commit comments

Comments
 (0)