CI Overview
What the self-hosted runner does on push and how to reproduce it locally.
Source: docs/ci/README.md
CI Overview
SciDEX-Substrate does not use GitHub Actions for normal CI. The active policy is self-hosted CI plus local hooks, as specified in SPEC-012.
Active Checks
| Layer | Command | Purpose |
|---|---|---|
| Local pre-commit hook | ruff format --check, ruff check |
Fast style and lint gate. |
| Local pre-push hook | ruff check, mypy, pytest tests/unit |
Cheap confidence before sharing a branch. |
| Self-hosted CI | ./scripts/ci.sh |
Reproduces the server-side runner locally. |
| API regression gate | scripts/ci_check_openapi_regression.py |
Prevents accidental verb schema breakage. |
Install hooks once:
./scripts/install-hooks.sh
Run the full local CI pipeline:
./scripts/ci.sh
For pure-Python test runs in a worktree, prefer pinning imports to the worktree:
PYTHONPATH=$PWD/src pytest tests/unit
This avoids the shared editable-install .pth footgun described in
../dev/failure-modes.md.
Database Safety
Tests must use a database whose name ends in _test.
Recommended default:
createdb scidex_v2_test
SCIDEX_TEST_DSN=postgresql:///scidex_v2_test PYTHONPATH=$PWD/src pytest tests/unit
The pytest guard rejects scidex, scidex_v2, and any non-test-suffixed DSN.
Do not bypass it. See ../dev/test-databases.md.
What scripts/ci.sh Covers
The script is the canonical local reproduction path for CI. It checks:
-
formatting and lint;
-
type checking where enabled;
-
unit tests;
-
API/OpenAPI regression checks;
-
any repo-local guard scripts wired into the CI script.
Inspect scripts/ci.sh for the exact current command list before debugging a
failure. Do not infer behavior from old GitHub Actions templates.
Historical GitHub Actions Files
This directory still contains old GitHub Actions templates for historical reference:
-
github-actions.yml.template -
github-actions-recommended.md
They are not the active CI path and should not be installed without an explicit
policy change. If an old doc tells you to copy those files into
.github/workflows/, treat that instruction as obsolete.