1616 RUST_PROFILE : release
1717 SLOW_MACHINE : 1
1818 CI_SERVER_URL : " http://35.239.136.52:3170"
19+ PYTEST_OPTS_BASE : " --reruns=10 -vvv --junit-xml=report.xml --timeout=1800 --durations=10"
1920
2021jobs :
2122 prebuild :
8990 - name : Check source
9091 env :
9192 VALGRIND : 0
92- PYTEST_OPTS : --timeout=1200 --durations=10
93+ PYTEST_OPTS : ${{ env.PYTEST_OPTS_BASE }}
9394 run : |
9495 uv run make check-source BASE_REF="origin/${{ github.base_ref }}"
96+ - name : Upload test results
97+ if : always()
98+ uses : actions/upload-artifact@v4
99+ with :
100+ name : pytest-results-prebuild
101+ path : report.xml
102+ if-no-files-found : ignore
95103 - name : Check Generated Files have been updated
96104 run : uv run make check-gen-updated
97105 - name : Check docs
@@ -167,7 +175,7 @@ jobs:
167175 # on the integration tests), so run them with `valgrind`
168176 name : Run unit tests
169177 runs-on : ubuntu-22.04
170- timeout-minutes : 30
178+ timeout-minutes : 60
171179 env :
172180 BOLTDIR : bolts
173181 needs :
@@ -310,18 +318,26 @@ jobs:
310318 LIGHTNINGD_POSTGRES_NO_VACUUM : 1
311319 VALGRIND : ${{ matrix.VALGRIND }}
312320 PREV_LIGHTNINGD : /tmp/old-cln/usr/bin/lightningd
321+ PYTEST_OPTS : ${{ env.PYTEST_OPTS_BASE }}
313322 run : |
314323 env
315324 cat config.vars
316- uv run eatmydata pytest tests/test_downgrade.py -vvv -n ${PYTEST_PAR} ${PYTEST_OPTS}
325+ uv run eatmydata pytest tests/test_downgrade.py -n ${PYTEST_PAR} ${PYTEST_OPTS}
326+ - name : Upload test results
327+ if : always()
328+ uses : actions/upload-artifact@v4
329+ with :
330+ name : pytest-results-check-downgrade-${{ matrix.TEST_DB_PROVIDER }}-${{ matrix.TEST_NETWORK }}
331+ path : report.xml
332+ if-no-files-found : ignore
317333
318334 integration :
319335 name : Test CLN ${{ matrix.name }}
320336 runs-on : ubuntu-22.04
321337 timeout-minutes : 120
322338 env :
323339 RUST_PROFILE : release # Has to match the one in the compile step
324- PYTEST_OPTS : --timeout=1200 --durations=10
340+ PYTEST_OPTS : --reruns=10 -vvv --junit-xml=report.xml -- timeout=1800 --durations=10
325341 needs :
326342 - compile
327343 strategy :
@@ -421,7 +437,14 @@ jobs:
421437 run : |
422438 env
423439 cat config.vars
424- VALGRIND=0 uv run eatmydata pytest tests/ -vvv -n ${PYTEST_PAR} ${PYTEST_OPTS}
440+ VALGRIND=0 uv run eatmydata pytest tests/ -n ${PYTEST_PAR} ${PYTEST_OPTS}
441+ - name : Upload test results
442+ if : always()
443+ uses : actions/upload-artifact@v4
444+ with :
445+ name : pytest-results-integration-${{ matrix.name }}
446+ path : report.xml
447+ if-no-files-found : ignore
425448
426449 integration-valgrind :
427450 name : Valgrind Test CLN ${{ matrix.name }}
@@ -430,32 +453,42 @@ jobs:
430453 env :
431454 RUST_PROFILE : release # Has to match the one in the compile step
432455 CFG : compile-gcc
433- PYTEST_OPTS : --test-group-random-seed=42 --timeout=1800 --durations=10
456+ PYTEST_OPTS : --reruns=10 -vvv --junit-xml=report.xml --timeout=1800 --durations=10 --test-group-random-seed=42
434457 needs :
435458 - compile
436459 strategy :
437460 fail-fast : false
438461 matrix :
439462 include :
440463 - NAME : Valgrind (01/10)
464+ GROUP : 1
441465 PYTEST_OPTS : --test-group=1 --test-group-count=10
442466 - NAME : Valgrind (02/10)
467+ GROUP : 2
443468 PYTEST_OPTS : --test-group=2 --test-group-count=10
444469 - NAME : Valgrind (03/10)
470+ GROUP : 3
445471 PYTEST_OPTS : --test-group=3 --test-group-count=10
446472 - NAME : Valgrind (04/10)
473+ GROUP : 4
447474 PYTEST_OPTS : --test-group=4 --test-group-count=10
448475 - NAME : Valgrind (05/10)
476+ GROUP : 5
449477 PYTEST_OPTS : --test-group=5 --test-group-count=10
450478 - NAME : Valgrind (06/10)
479+ GROUP : 6
451480 PYTEST_OPTS : --test-group=6 --test-group-count=10
452481 - NAME : Valgrind (07/10)
482+ GROUP : 7
453483 PYTEST_OPTS : --test-group=7 --test-group-count=10
454484 - NAME : Valgrind (08/10)
485+ GROUP : 8
455486 PYTEST_OPTS : --test-group=8 --test-group-count=10
456487 - NAME : Valgrind (09/10)
488+ GROUP : 9
457489 PYTEST_OPTS : --test-group=9 --test-group-count=10
458490 - NAME : Valgrind (10/10)
491+ GROUP : 10
459492 PYTEST_OPTS : --test-group=10 --test-group-count=10
460493 steps :
461494 - name : Checkout
@@ -491,7 +524,14 @@ jobs:
491524 SLOW_MACHINE : 1
492525 TEST_DEBUG : 1
493526 run : |
494- VALGRIND=1 uv run eatmydata pytest tests/ -vvv -n 3 ${PYTEST_OPTS} ${{ matrix.PYTEST_OPTS }}
527+ VALGRIND=1 uv run eatmydata pytest tests/ -n 3 ${PYTEST_OPTS} ${{ matrix.PYTEST_OPTS }}
528+ - name : Upload test results
529+ if : always()
530+ uses : actions/upload-artifact@v4
531+ with :
532+ name : pytest-results-integration-valgrind-${{ matrix.GROUP }}
533+ path : report.xml
534+ if-no-files-found : ignore
495535
496536 integration-sanitizers :
497537 name : Sanitizers Test CLN
@@ -501,33 +541,49 @@ jobs:
501541 RUST_PROFILE : release
502542 SLOW_MACHINE : 1
503543 TEST_DEBUG : 1
504- PYTEST_OPTS : --test-group-random-seed=42 --timeout=1800 --durations=10
544+ PYTEST_OPTS : --reruns=10 -vvv --junit-xml=report.xml --timeout=1800 --durations=10 --test-group-random-seed=42
505545 needs :
506546 - compile
507547 strategy :
508548 fail-fast : false
509549 matrix :
510550 include :
511- - NAME : ASan/UBSan (01/10)
512- PYTEST_OPTS : --test-group=1 --test-group-count=10
513- - NAME : ASan/UBSan (02/10)
514- PYTEST_OPTS : --test-group=2 --test-group-count=10 -n 1
515- - NAME : ASan/UBSan (03/10)
516- PYTEST_OPTS : --test-group=3 --test-group-count=10
517- - NAME : ASan/UBSan (04/10)
518- PYTEST_OPTS : --test-group=4 --test-group-count=10
519- - NAME : ASan/UBSan (05/10)
520- PYTEST_OPTS : --test-group=5 --test-group-count=10
521- - NAME : ASan/UBSan (06/10)
522- PYTEST_OPTS : --test-group=6 --test-group-count=10
523- - NAME : ASan/UBSan (07/10)
524- PYTEST_OPTS : --test-group=7 --test-group-count=10
525- - NAME : ASan/UBSan (08/10)
526- PYTEST_OPTS : --test-group=8 --test-group-count=10
527- - NAME : ASan/UBSan (09/10)
528- PYTEST_OPTS : --test-group=9 --test-group-count=10
529- - NAME : ASan/UBSan (10/10)
530- PYTEST_OPTS : --test-group=10 --test-group-count=10
551+ - NAME : ASan/UBSan (01/12)
552+ GROUP : 1
553+ PYTEST_OPTS : --test-group=1 --test-group-count=12
554+ - NAME : ASan/UBSan (02/12)
555+ GROUP : 2
556+ PYTEST_OPTS : --test-group=2 --test-group-count=12 -n 1
557+ - NAME : ASan/UBSan (03/12)
558+ GROUP : 3
559+ PYTEST_OPTS : --test-group=3 --test-group-count=12
560+ - NAME : ASan/UBSan (04/12)
561+ GROUP : 4
562+ PYTEST_OPTS : --test-group=4 --test-group-count=12
563+ - NAME : ASan/UBSan (05/12)
564+ GROUP : 5
565+ PYTEST_OPTS : --test-group=5 --test-group-count=12
566+ - NAME : ASan/UBSan (06/12)
567+ GROUP : 6
568+ PYTEST_OPTS : --test-group=6 --test-group-count=12
569+ - NAME : ASan/UBSan (07/12)
570+ GROUP : 7
571+ PYTEST_OPTS : --test-group=7 --test-group-count=12
572+ - NAME : ASan/UBSan (08/12)
573+ GROUP : 8
574+ PYTEST_OPTS : --test-group=8 --test-group-count=12
575+ - NAME : ASan/UBSan (09/12)
576+ GROUP : 9
577+ PYTEST_OPTS : --test-group=9 --test-group-count=12
578+ - NAME : ASan/UBSan (10/12)
579+ GROUP : 10
580+ PYTEST_OPTS : --test-group=10 --test-group-count=12
581+ - NAME : ASan/UBSan (11/12)
582+ GROUP : 11
583+ PYTEST_OPTS : --test-group=11 --test-group-count=12
584+ - NAME : ASan/UBSan (12/12)
585+ GROUP : 12
586+ PYTEST_OPTS : --test-group=12 --test-group-count=12
531587 steps :
532588 - name : Checkout
533589 uses : actions/checkout@v4
@@ -557,7 +613,14 @@ jobs:
557613
558614 - name : Test
559615 run : |
560- uv run eatmydata pytest tests/ -vvv -n 2 ${PYTEST_OPTS} ${{ matrix.PYTEST_OPTS }}
616+ uv run eatmydata pytest tests/ -n 2 ${PYTEST_OPTS} ${{ matrix.PYTEST_OPTS }}
617+ - name : Upload test results
618+ if : always()
619+ uses : actions/upload-artifact@v4
620+ with :
621+ name : pytest-results-integration-sanitizers-${{ matrix.GROUP }}
622+ path : report.xml
623+ if-no-files-found : ignore
561624
562625 update-docs-examples :
563626 name : Update examples in doc schemas (disabled temporarily!)
@@ -569,7 +632,7 @@ jobs:
569632 env :
570633 VALGRIND : 0
571634 GENERATE_EXAMPLES : 1
572- PYTEST_OPTS : --timeout=1200 --durations=10
635+ PYTEST_OPTS : --reruns=10 -vvv --junit-xml=report.xml -- timeout=1800 --durations=10
573636 TEST_NETWORK : regtest
574637 needs :
575638 - compile
@@ -601,14 +664,21 @@ jobs:
601664 - name : Test
602665 run : |
603666 uv run eatmydata make -j $(nproc) check-doc-examples
667+ - name : Upload test results
668+ if : always()
669+ uses : actions/upload-artifact@v4
670+ with :
671+ name : pytest-results-update-docs-examples
672+ path : report.xml
673+ if-no-files-found : ignore
604674
605675 min-btc-support :
606676 name : Test minimum supported BTC v${{ matrix.MIN_BTC_VERSION }} with ${{ matrix.NAME }}
607677 runs-on : ubuntu-22.04
608678 timeout-minutes : 120
609679 env :
610680 RUST_PROFILE : release # Has to match the one in the compile step
611- PYTEST_OPTS : --timeout=1200 --durations=10
681+ PYTEST_OPTS : --reruns=10 -vvv --junit-xml=report.xml -- timeout=1800 --durations=10
612682 needs :
613683 - compile
614684 strategy :
@@ -674,26 +744,15 @@ jobs:
674744 run : |
675745 env
676746 cat config.vars
677- VALGRIND=0 uv run eatmydata pytest tests/ -vvv -n ${PYTEST_PAR} ${PYTEST_OPTS}
678-
679- check-flake :
680- name : Check Nix Flake
681- runs-on : ubuntu-22.04
682- strategy :
683- fail-fast : true
684- steps :
685- - name : Checkout
686- uses : actions/checkout@v4
687- with :
688- submodules : ' recursive'
689- - name : Check Nix flake inputs
690- uses : DeterminateSystems/flake-checker-action@v8
691- - name : Install Nix
692- uses : cachix/install-nix-action@v31
747+ VALGRIND=0 uv run eatmydata pytest tests/ -n ${PYTEST_PAR} ${PYTEST_OPTS}
748+ - name : Upload test results
749+ if : always()
750+ uses : actions/upload-artifact@v4
693751 with :
694- nix_path : nixpkgs=channel:nixos-unstable
695- - name : Check flake
696- run : nix flake check
752+ name : pytest-results-min-btc-support-${{ matrix.NAME }}
753+ path : report.xml
754+ if-no-files-found : ignore
755+
697756
698757 gather :
699758 # A dummy task that depends on the full matrix of tests, and
0 commit comments