Split CI into parallel unit, integration, and coverage report jobs #28

Merged
brian merged 4 commits from cursor/split-ci-test-jobs into main 2026-07-07 19:37:29 +02:00
Owner

Summary
Replaces the single test job in .gitea/workflows/test.yml with three jobs:

unit-tests — runs pytest tests/unit/ -m "not integration" with coverage (no Docker)
integration-tests — runs pytest -m integration with coverage (requires Docker via testcontainers)
coverage-report — downloads both .coverage artifacts, merges them with coverage combine, and posts the combined report to the PR
Unit and integration jobs run in parallel for faster feedback and clearer failure isolation. The coverage report still reflects the full suite.

Also adds a short note to the README Development section describing the CI layout.

No version-bump prefix — CI/test-only change.

Test plan

Unit tests pass locally (uv run pytest tests/unit/ -m "not integration")

Integration tests pass locally (uv run pytest -m integration, requires Docker)

Combined coverage verified locally (coverage combine across separate artifact dirs)

CI passes on this PR (all three jobs green, coverage comment posted)

Summary Replaces the single test job in .gitea/workflows/test.yml with three jobs: unit-tests — runs pytest tests/unit/ -m "not integration" with coverage (no Docker) integration-tests — runs pytest -m integration with coverage (requires Docker via testcontainers) coverage-report — downloads both .coverage artifacts, merges them with coverage combine, and posts the combined report to the PR Unit and integration jobs run in parallel for faster feedback and clearer failure isolation. The coverage report still reflects the full suite. Also adds a short note to the README Development section describing the CI layout. No version-bump prefix — CI/test-only change. Test plan Unit tests pass locally (uv run pytest tests/unit/ -m "not integration") Integration tests pass locally (uv run pytest -m integration, requires Docker) Combined coverage verified locally (coverage combine across separate artifact dirs) CI passes on this PR (all three jobs green, coverage comment posted)
brian added 1 commit 2026-07-06 22:05:11 +02:00
Split CI into parallel unit, integration, and coverage report jobs.
Code Quality Pipeline / code-quality (pull_request) Successful in 32s
PR Title Check / check-title (pull_request) Successful in 6s
Test Python Package / unit-tests (pull_request) Successful in 1m28s
Test Python Package / integration-tests (pull_request) Successful in 56s
Test Python Package / coverage-report (pull_request) Failing after 11s
9538e4d26d
Run test jobs in parallel and merge coverage artifacts for an accurate full-suite PR report.

Co-authored-by: Cursor <[email protected]>
brian added 1 commit 2026-07-07 19:18:02 +02:00
Use artifact action v3 for Gitea Actions compatibility.
PR Title Check / check-title (pull_request) Successful in 5s
Code Quality Pipeline / code-quality (pull_request) Successful in 24s
Test Python Package / unit-tests (pull_request) Successful in 22s
Test Python Package / integration-tests (pull_request) Successful in 32s
Test Python Package / coverage-report (pull_request) Failing after 3m18s
5d33ec6091
Gitea does not support upload-artifact/download-artifact v4 yet.

Co-authored-by: Cursor <[email protected]>
brian added 1 commit 2026-07-07 19:27:31 +02:00
Avoid cross-job artifacts; combine coverage with --cov-append.
PR Title Check / check-title (pull_request) Successful in 4s
Test Python Package / unit-tests (pull_request) Successful in 10s
Code Quality Pipeline / code-quality (pull_request) Successful in 24s
Test Python Package / integration-tests (pull_request) Successful in 20s
Test Python Package / coverage-report (pull_request) Successful in 24s
0315a33a3b
Gitea artifact download is unreliable with v3 actions, so the report job re-runs both suites on one runner after parallel test gates pass.

Co-authored-by: Cursor <[email protected]>
Member

Test Coverage Report:

============================= test session starts ==============================
platform linux -- Python 3.12.13, pytest-9.1.1, pluggy-1.6.0
rootdir: /workspace/brian/python-repositories
configfile: pyproject.toml
testpaths: tests
plugins: cov-7.1.0, anyio-4.14.1
collected 109 items / 62 deselected / 47 selected

tests/integration/examples_test.py ...                                   [  6%]
tests/integration/minio_adapter_test.py .........................        [ 59%]
tests/integration/redis_adapter_test.py ...................              [100%]

================================ tests coverage ================================
_______________ coverage: platform linux, python 3.12.13-final-0 _______________

Name                                                            Stmts   Miss  Cover   Missing
---------------------------------------------------------------------------------------------
python_repositories/__init__.py                                    12      1    92%   43
python_repositories/adapters/__init__.py                           13      2    85%   37, 42
python_repositories/adapters/connection_aware_adapter.py           45      0   100%
python_repositories/adapters/minio_adapter.py                     119      8    93%   62-70, 75
python_repositories/adapters/redis_adapter.py                      96     11    89%   54-65, 67-69
python_repositories/config/__init__.py                              4      0   100%
python_repositories/config/dotenv_loader.py                         7      0   100%
python_repositories/config/minio_config.py                         31      0   100%
python_repositories/config/redis_config.py                         14      0   100%
python_repositories/examples/__init__.py                            0      0   100%
python_repositories/examples/artifact_object_repository.py          9      0   100%
python_repositories/examples/user_json_repository.py               10      0   100%
python_repositories/interfaces/__init__.py                          5      0   100%
python_repositories/interfaces/connection_aware_interface.py        8      0   100%
python_repositories/interfaces/context_aware_interface.py           8      0   100%
python_repositories/interfaces/json_repository_interface.py        10      0   100%
python_repositories/interfaces/object_repository_interface.py      11      0   100%
---------------------------------------------------------------------------------------------
TOTAL                                                             402     22    95%
====================== 47 passed, 62 deselected in 11.00s ======================

**Test Coverage Report:** ``` ============================= test session starts ============================== platform linux -- Python 3.12.13, pytest-9.1.1, pluggy-1.6.0 rootdir: /workspace/brian/python-repositories configfile: pyproject.toml testpaths: tests plugins: cov-7.1.0, anyio-4.14.1 collected 109 items / 62 deselected / 47 selected tests/integration/examples_test.py ... [ 6%] tests/integration/minio_adapter_test.py ......................... [ 59%] tests/integration/redis_adapter_test.py ................... [100%] ================================ tests coverage ================================ _______________ coverage: platform linux, python 3.12.13-final-0 _______________ Name Stmts Miss Cover Missing --------------------------------------------------------------------------------------------- python_repositories/__init__.py 12 1 92% 43 python_repositories/adapters/__init__.py 13 2 85% 37, 42 python_repositories/adapters/connection_aware_adapter.py 45 0 100% python_repositories/adapters/minio_adapter.py 119 8 93% 62-70, 75 python_repositories/adapters/redis_adapter.py 96 11 89% 54-65, 67-69 python_repositories/config/__init__.py 4 0 100% python_repositories/config/dotenv_loader.py 7 0 100% python_repositories/config/minio_config.py 31 0 100% python_repositories/config/redis_config.py 14 0 100% python_repositories/examples/__init__.py 0 0 100% python_repositories/examples/artifact_object_repository.py 9 0 100% python_repositories/examples/user_json_repository.py 10 0 100% python_repositories/interfaces/__init__.py 5 0 100% python_repositories/interfaces/connection_aware_interface.py 8 0 100% python_repositories/interfaces/context_aware_interface.py 8 0 100% python_repositories/interfaces/json_repository_interface.py 10 0 100% python_repositories/interfaces/object_repository_interface.py 11 0 100% --------------------------------------------------------------------------------------------- TOTAL 402 22 95% ====================== 47 passed, 62 deselected in 11.00s ====================== ```
brian added 1 commit 2026-07-07 19:35:23 +02:00
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
c1f4826d78
Restore per-job coverage uploads while keeping unit and integration jobs parallel on Gitea 1.26.

Co-authored-by: Cursor <[email protected]>
Member

Test Coverage Report:

Name                                                            Stmts   Miss  Cover   Missing
---------------------------------------------------------------------------------------------
python_repositories/__init__.py                                    12      1    92%   43
python_repositories/adapters/__init__.py                           13      2    85%   37, 42
python_repositories/adapters/connection_aware_adapter.py           45      0   100%
python_repositories/adapters/minio_adapter.py                     119      8    93%   62-70, 75
python_repositories/adapters/redis_adapter.py                      96     11    89%   54-65, 67-69
python_repositories/config/__init__.py                              4      0   100%
python_repositories/config/dotenv_loader.py                         7      0   100%
python_repositories/config/minio_config.py                         31      0   100%
python_repositories/config/redis_config.py                         14      0   100%
python_repositories/examples/__init__.py                            0      0   100%
python_repositories/examples/artifact_object_repository.py          9      0   100%
python_repositories/examples/user_json_repository.py               10      0   100%
python_repositories/interfaces/__init__.py                          5      0   100%
python_repositories/interfaces/connection_aware_interface.py        8      0   100%
python_repositories/interfaces/context_aware_interface.py           8      0   100%
python_repositories/interfaces/json_repository_interface.py        10      0   100%
python_repositories/interfaces/object_repository_interface.py      11      0   100%
---------------------------------------------------------------------------------------------
TOTAL                                                             402     22    95%

**Test Coverage Report:** ``` Name Stmts Miss Cover Missing --------------------------------------------------------------------------------------------- python_repositories/__init__.py 12 1 92% 43 python_repositories/adapters/__init__.py 13 2 85% 37, 42 python_repositories/adapters/connection_aware_adapter.py 45 0 100% python_repositories/adapters/minio_adapter.py 119 8 93% 62-70, 75 python_repositories/adapters/redis_adapter.py 96 11 89% 54-65, 67-69 python_repositories/config/__init__.py 4 0 100% python_repositories/config/dotenv_loader.py 7 0 100% python_repositories/config/minio_config.py 31 0 100% python_repositories/config/redis_config.py 14 0 100% python_repositories/examples/__init__.py 0 0 100% python_repositories/examples/artifact_object_repository.py 9 0 100% python_repositories/examples/user_json_repository.py 10 0 100% python_repositories/interfaces/__init__.py 5 0 100% python_repositories/interfaces/connection_aware_interface.py 8 0 100% python_repositories/interfaces/context_aware_interface.py 8 0 100% python_repositories/interfaces/json_repository_interface.py 10 0 100% python_repositories/interfaces/object_repository_interface.py 11 0 100% --------------------------------------------------------------------------------------------- TOTAL 402 22 95% ```
brian merged commit e39fc96ac1 into main 2026-07-07 19:37:29 +02:00
brian deleted branch cursor/split-ci-test-jobs 2026-07-07 19:37:29 +02:00
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lille-vemmelund/python-repositories#28