Use christopherhx v4 artifact actions for parallel coverage merge.
PR Title Check / check-title (pull_request) Successful in 6s
Test Python Package / unit-tests (pull_request) Successful in 18s
Code Quality Pipeline / code-quality (pull_request) Successful in 24s
Test Python Package / integration-tests (pull_request) Successful in 46s
Test Python Package / coverage-report (pull_request) Successful in 16s

Restore per-job coverage uploads while keeping unit and integration jobs parallel on Gitea 1.26.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Brian Bjarke Jensen
2026-07-07 19:35:19 +02:00
co-authored by Cursor
parent 0315a33a3b
commit c1f4826d78
2 changed files with 40 additions and 13 deletions
+39 -12
View File
@@ -27,7 +27,18 @@ jobs:
run: uv sync --all-extras
- name: Run unit tests
run: uv run pytest tests/unit/ -m "not integration" -v
run: |
uv run pytest tests/unit/ -m "not integration" \
--cov=python_repositories \
--cov-report=
- name: Upload unit coverage
uses: https://github.com/christopherHX/gitea-upload-artifact@v4
with:
name: coverage-unit
path: .coverage
retention-days: 1
compression-level: 0
integration-tests:
runs-on: ubuntu-latest
@@ -52,7 +63,18 @@ jobs:
run: docker info
- name: Run integration tests
run: uv run pytest -m integration -v
run: |
uv run pytest -m integration \
--cov=python_repositories \
--cov-report=
- name: Upload integration coverage
uses: https://github.com/christopherHX/gitea-upload-artifact@v4
with:
name: coverage-integration
path: .coverage
retention-days: 1
compression-level: 0
coverage-report:
needs: [unit-tests, integration-tests]
@@ -75,17 +97,22 @@ jobs:
UV_LINK_MODE: copy
run: uv sync --all-extras
# Gitea Actions lacks cross-job artifact download APIs; re-run tests here
# with --cov-append on one runner for an accurate combined report.
- name: Run tests with combined coverage
- name: Download unit coverage
uses: https://github.com/christopherHX/gitea-download-artifact@v4
with:
name: coverage-unit
path: coverage-unit
- name: Download integration coverage
uses: https://github.com/christopherHX/gitea-download-artifact@v4
with:
name: coverage-integration
path: coverage-integration
- name: Combine coverage report
run: |
uv run pytest tests/unit/ -m "not integration" \
--cov=python_repositories \
--cov-report=
uv run pytest -m integration \
--cov=python_repositories \
--cov-append \
--cov-report=term-missing > coverage.txt
uv run coverage combine coverage-unit/.coverage coverage-integration/.coverage
uv run coverage report -m --include='python_repositories/*' > coverage.txt
cat coverage.txt
- name: Post coverage summary to PR