Skip to content

Commit 4792e15

Browse files
cdeckerclaude
andcommitted
CI: add artifact upload for pytest JUnit XML reports.
Adds upload-artifact steps after each test run to preserve test results as GitHub artifacts. Each job uploads its report.xml with a unique name based on the job and matrix configuration. Artifacts are uploaded even when tests fail (if: always()) to ensure test results are available for debugging. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
1 parent 53af664 commit 4792e15

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,13 @@ jobs:
9393
PYTEST_OPTS: ${{ env.PYTEST_OPTS_BASE }}
9494
run: |
9595
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
96103
- name: Check Generated Files have been updated
97104
run: uv run make check-gen-updated
98105
- name: Check docs
@@ -315,6 +322,13 @@ jobs:
315322
env
316323
cat config.vars
317324
uv run eatmydata pytest tests/test_downgrade.py -n ${PYTEST_PAR} ${PYTEST_OPTS}
325+
- name: Upload test results
326+
if: always()
327+
uses: actions/upload-artifact@v4
328+
with:
329+
name: pytest-results-check-downgrade-${{ matrix.TEST_DB_PROVIDER }}-${{ matrix.TEST_NETWORK }}
330+
path: report.xml
331+
if-no-files-found: ignore
318332

319333
integration:
320334
name: Test CLN ${{ matrix.name }}
@@ -423,6 +437,13 @@ jobs:
423437
env
424438
cat config.vars
425439
VALGRIND=0 uv run eatmydata pytest tests/ -n ${PYTEST_PAR} ${PYTEST_OPTS}
440+
- name: Upload test results
441+
if: always()
442+
uses: actions/upload-artifact@v4
443+
with:
444+
name: pytest-results-integration-${{ matrix.name }}
445+
path: report.xml
446+
if-no-files-found: ignore
426447

427448
integration-valgrind:
428449
name: Valgrind Test CLN ${{ matrix.name }}
@@ -493,6 +514,13 @@ jobs:
493514
TEST_DEBUG: 1
494515
run: |
495516
VALGRIND=1 uv run eatmydata pytest tests/ -n 3 ${PYTEST_OPTS} ${{ matrix.PYTEST_OPTS }}
517+
- name: Upload test results
518+
if: always()
519+
uses: actions/upload-artifact@v4
520+
with:
521+
name: pytest-results-integration-valgrind-${{ matrix.NAME }}
522+
path: report.xml
523+
if-no-files-found: ignore
496524

497525
integration-sanitizers:
498526
name: Sanitizers Test CLN
@@ -563,6 +591,13 @@ jobs:
563591
- name: Test
564592
run: |
565593
uv run eatmydata pytest tests/ -n 2 ${PYTEST_OPTS} ${{ matrix.PYTEST_OPTS }}
594+
- name: Upload test results
595+
if: always()
596+
uses: actions/upload-artifact@v4
597+
with:
598+
name: pytest-results-integration-sanitizers-${{ matrix.NAME }}
599+
path: report.xml
600+
if-no-files-found: ignore
566601

567602
update-docs-examples:
568603
name: Update examples in doc schemas (disabled temporarily!)
@@ -606,6 +641,13 @@ jobs:
606641
- name: Test
607642
run: |
608643
uv run eatmydata make -j $(nproc) check-doc-examples
644+
- name: Upload test results
645+
if: always()
646+
uses: actions/upload-artifact@v4
647+
with:
648+
name: pytest-results-update-docs-examples
649+
path: report.xml
650+
if-no-files-found: ignore
609651

610652
min-btc-support:
611653
name: Test minimum supported BTC v${{ matrix.MIN_BTC_VERSION }} with ${{ matrix.NAME }}
@@ -680,6 +722,13 @@ jobs:
680722
env
681723
cat config.vars
682724
VALGRIND=0 uv run eatmydata pytest tests/ -n ${PYTEST_PAR} ${PYTEST_OPTS}
725+
- name: Upload test results
726+
if: always()
727+
uses: actions/upload-artifact@v4
728+
with:
729+
name: pytest-results-min-btc-support-${{ matrix.NAME }}
730+
path: report.xml
731+
if-no-files-found: ignore
683732

684733

685734
gather:

0 commit comments

Comments
 (0)