Compare commits

..
7 Commits
Author SHA1 Message Date
brian e39fc96ac1 Merge pull request 'Split CI into parallel unit, integration, and coverage report jobs' (#28) from cursor/split-ci-test-jobs into main
Code Quality Pipeline / code-quality (push) Successful in 23s
Test Python Package / coverage-report (push) Successful in 10s
Release on merge to main / release (push) Successful in 6s
Test Python Package / unit-tests (push) Successful in 13s
Test Python Package / integration-tests (push) Successful in 22s
Reviewed-on: https://gitea.lille-vemmelund.dk/brian/python-repositories/pulls/28
2026-07-07 19:37:27 +02:00
Brian Bjarke JensenandCursor c1f4826d78 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]>
2026-07-07 19:35:19 +02:00
Brian Bjarke JensenandCursor 0315a33a3b 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
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]>
2026-07-07 19:27:26 +02:00
Brian Bjarke JensenandCursor 5d33ec6091 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
Gitea does not support upload-artifact/download-artifact v4 yet.

Co-authored-by: Cursor <[email protected]>
2026-07-07 19:17:57 +02:00
Brian Bjarke JensenandCursor 9538e4d26d 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
Run test jobs in parallel and merge coverage artifacts for an accurate full-suite PR report.

Co-authored-by: Cursor <[email protected]>
2026-07-06 22:02:35 +02:00
brian 14b8d2798c Merge pull request 'Replace hardcoded version examples in release docs' (#27) from cursor/fix-version-doc-drift into main
Test Python Package / test (push) Successful in 52s
Code Quality Pipeline / code-quality (push) Successful in 46s
Release on merge to main / release (push) Successful in 7s
Reviewed-on: https://gitea.lille-vemmelund.dk/brian/python-repositories/pulls/27
2026-07-06 21:37:34 +02:00
Brian Bjarke JensenandCursor d3cbb65bbc Use version-agnostic examples in release docs.
Code Quality Pipeline / code-quality (pull_request) Successful in 46s
PR Title Check / check-title (pull_request) Successful in 6s
Test Python Package / test (pull_request) Successful in 1m21s
Replace hardcoded semver examples with stable placeholders and point readers to pyproject.toml for the current version.

Co-authored-by: Cursor <[email protected]>
2026-07-06 21:25:50 +02:00
3 changed files with 99 additions and 11 deletions
+5 -3
View File
@@ -2,9 +2,11 @@
If this PR changes files under `python_repositories/`, the **title must** start with one of: If this PR changes files under `python_repositories/`, the **title must** start with one of:
- `[patch]` or `[fix]` — bug fix (0.3.1 → 0.3.2) - `[patch]` or `[fix]` — bug fix (`1.2.3``1.2.4`)
- `[minor]` or `[feat]` — new feature (0.3.1 → 0.4.0) - `[minor]` or `[feat]` — new feature (`1.2.3``1.3.0`)
- `[major]` or `[breaking]` — breaking change (0.3.1 → 1.0.0) - `[major]` or `[breaking]` — breaking change (`1.2.3``2.0.0`)
Current version: see [`pyproject.toml`](pyproject.toml) on `main`.
Docs-, CI-, or test-only PRs do not need a prefix. Docs-, CI-, or test-only PRs do not need a prefix.
+88 -4
View File
@@ -7,7 +7,7 @@ on:
pull_request: pull_request:
jobs: jobs:
test: unit-tests:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout code - name: Checkout code
@@ -26,10 +26,94 @@ jobs:
UV_LINK_MODE: copy UV_LINK_MODE: copy
run: uv sync --all-extras run: uv sync --all-extras
- name: Run pytest - name: Run unit tests
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
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: .python-version
- name: Install uv
run: pip install uv
- name: Install dependencies
env: env:
PYTHONPATH: . UV_LINK_MODE: copy
run: uv run pytest --cov=python_repositories --cov-report=term-missing > coverage.txt run: uv sync --all-extras
- name: Verify Docker
run: docker info
- name: Run integration tests
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]
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' || github.event_name == 'push'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: .python-version
- name: Install uv
run: pip install uv
- name: Install dependencies
env:
UV_LINK_MODE: copy
run: uv sync --all-extras
- 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 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 - name: Post coverage summary to PR
if: github.event_name == 'pull_request' if: github.event_name == 'pull_request'
+6 -4
View File
@@ -148,6 +148,8 @@ uv run pytest -v # full suite (requires Doc
Integration tests are marked with `@pytest.mark.integration` and require Docker (testcontainers). Run unit tests alone for quick local feedback. Integration tests are marked with `@pytest.mark.integration` and require Docker (testcontainers). Run unit tests alone for quick local feedback.
CI runs unit and integration tests in parallel with coverage, then merges `.coverage` artifacts in a follow-up job (via [christopherhx/gitea-\*-artifact@v4](https://github.com/christopherHX/gitea-upload-artifact) for Gitea 1.26 compatibility).
`pre-commit` is included in the dev dependency group. `uv sync` installs the CLI, but git does not run hooks until you install them with `pre-commit install` (one time per clone). After that, commits run the checks defined in [`.pre-commit-config.yaml`](.pre-commit-config.yaml) (ruff, mypy, pyupgrade, prettier, and general file hygiene). `pre-commit` is included in the dev dependency group. `uv sync` installs the CLI, but git does not run hooks until you install them with `pre-commit install` (one time per clone). After that, commits run the checks defined in [`.pre-commit-config.yaml`](.pre-commit-config.yaml) (ruff, mypy, pyupgrade, prettier, and general file hygiene).
To run all hooks manually without committing: To run all hooks manually without committing:
@@ -173,9 +175,9 @@ Docs-, CI-, and test-only PRs do not need a prefix and will not trigger a releas
| Prefix | Bump | Example | | Prefix | Bump | Example |
| ------------------------- | ---------- | --------------------- | | ------------------------- | ---------- | --------------------- |
| `[patch]` or `[fix]` | patch | `0.3.1``0.3.2` | | `[patch]` or `[fix]` | patch | `1.2.3``1.2.4` |
| `[minor]` or `[feat]` | minor | `0.3.1``0.4.0` | | `[minor]` or `[feat]` | minor | `1.2.3``1.3.0` |
| `[major]` or `[breaking]` | major | `0.3.1``1.0.0` | | `[major]` or `[breaking]` | major | `1.2.3``2.0.0` |
| _(none)_ | no release | docs / CI / deps only | | _(none)_ | no release | docs / CI / deps only |
Example titles: Example titles:
@@ -189,4 +191,4 @@ Release notes are generated from commits since the previous tag (see [`scripts/c
### Manual release ### Manual release
You can still push a `v*.*.*` tag manually; `publish.yml` will build and publish. The current baseline version is **0.3.1**. You can still push a `v*.*.*` tag manually; `publish.yml` will build and publish. The current released version is in [`pyproject.toml`](pyproject.toml) (and on the latest `v*.*.*` tag).