Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ on:
type: string
default: "auto"
description: "Version resolution for from-head: auto | patch | minor (forced)."
submodules:
type: string
default: ""
description: "Space-separated submodule paths to init after checkout (e.g. 'schemas'). Empty (default) inits nothing. The submodule must be reachable by the job token -- public, or a token with cross-repo read access."
secrets:
JFROG_TOKEN:
required: false
Expand Down Expand Up @@ -232,6 +236,12 @@ jobs:
- name: Install dependencies
run: uv sync --frozen --all-extras

- name: Init submodules
if: ${{ inputs.submodules != '' }}
env:
SUBMODULES: ${{ inputs.submodules }}
run: git submodule update --init --depth 1 $SUBMODULES

- name: Run tests
run: ${{ env.HYPERCI_INSTALL }} run test

Expand Down
10 changes: 7 additions & 3 deletions docs/LESSONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,13 @@ build to ensure fresh artifacts, also via `hyperi-ci run build`.
- Detection: directory-based > marker-based > conftest-based
- Coverage: separate `.coverage.<tier>` files, combine at end
- No test directory: exit 0 (graceful skip)
- Private submodules (e.g. `dfe-schemas`): mark dependent tests with
`@pytest.mark.skipif(not schemas_dir.exists(), reason="submodule not checked out")`
rather than trying to check out private submodules in CI (GITHUB_TOKEN can't)
- Submodule-dependent tests:
- Public submodule: set the `submodules` input on the reusable workflow
(e.g. `submodules: schemas`) so CI checks it out and the tests run.
- Private submodule (e.g. `dfe-schemas` while private): GITHUB_TOKEN can't
clone it, so mark dependent tests with
`@pytest.mark.skipif(not schemas_dir.exists(), reason="submodule not checked out")`
rather than checking it out in CI (or wire a cross-repo token).

### Publishing

Expand Down
Loading