From 17512ab3966313d95605da540ea68043f0a85d6c Mon Sep 17 00:00:00 2001 From: Derek Date: Mon, 2 Nov 2026 01:05:32 +1100 Subject: [PATCH] fix(ci): run the full test tier nightly and before every release Releases require a full-tier run (`test.full.required_for_release: true`). CI runs the full tier nightly at 16:19 UTC. The CI caller forwards `test-tier`, so manual runs can select full. tests/TESTING.md says what each tier runs and which tests use the shared ClickHouse and Kafka, the PostgreSQL and MySQL containers, or no container. Core and full run the same tests because `addopts` deselects nothing. --- .github/workflows/ci.yml | 9 +++++++++ .hyperi-ci.yaml | 3 +++ tests/TESTING.md | 14 ++++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 tests/TESTING.md diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9fd7c17..61c2292 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,8 @@ name: CI on: + schedule: + - cron: '19 16 * * *' push: branches: ["**"] pull_request: @@ -29,6 +31,12 @@ on: required: false default: "auto" description: "Version resolution for from-head: auto | patch | minor | X.Y.Z" + test-tier: + type: choice + required: false + default: "core" + options: [core, full] + description: "core | full. full runs the full test tier on this run." permissions: contents: write @@ -44,4 +52,5 @@ jobs: tag: ${{ inputs.tag || '' }} from-head: ${{ inputs.from-head || '' }} bump: ${{ inputs.bump || 'auto' }} + test-tier: ${{ inputs.test-tier || 'core' }} secrets: inherit diff --git a/.hyperi-ci.yaml b/.hyperi-ci.yaml index 14952b4..f56523c 100644 --- a/.hyperi-ci.yaml +++ b/.hyperi-ci.yaml @@ -11,6 +11,9 @@ test: min_coverage: 75 # currently 80%; ratchet up as coverage improves python: parallel: auto + # The full tier (tests/TESTING.md) runs nightly and before every release. + full: + required_for_release: true quality: # examples/ are illustrative snippets, not scanned code diff --git a/tests/TESTING.md b/tests/TESTING.md new file mode 100644 index 0000000..db1fd72 --- /dev/null +++ b/tests/TESTING.md @@ -0,0 +1,14 @@ +# Testing + +The general rules are hyperi-ai's testing standard (`standards/universal/testing.md` in hyperi-ai). This page covers what logreducer does on top of them. + +| Level | Runs | Command | +|---|---|---| +| core | locally, every push and PR | `hyperi-ci run test`, or `uv run pytest` | +| full | nightly (`schedule` in `.github/workflows/ci.yml`) and before every release (`test.full.required_for_release: true`) | `hyperi-ci run test --tier full` | + +`addopts` deselects nothing, so core and full run the same tests today. The full tier is what a release waits on. A test that grows slow enough to move out of core gets a marker and an `addopts -m` deselect, and full still runs it. + +ClickHouse and Kafka are the run's shared services from scalo-py's test plugin, loaded in `tests/conftest.py`. That's one container per service per run, shared by every xdist worker, with a database or topics of its own for each test. The images, the naming and the clean-up are scalo-py's, in its `tests/TESTING.md`. `HYPERI_TEST_*` settings point a local run at an existing ClickHouse or Kafka instead. + +PostgreSQL (`postgres:16.6`) and MySQL (`mysql:8.4.5`) are throwaway testcontainers in `tests/integration/conftest.py`, because the plugin doesn't provide them. Each starts once per session and stops when it ends. `LOGREDUCER_KEEP_CONTAINERS=1` leaves them running, and without Docker those tests skip. Unit tests (`tests/unit/`) use no container.