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
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
name: CI

on:
schedule:
- cron: '19 16 * * *'
push:
branches: ["**"]
pull_request:
Expand All @@ -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
Expand All @@ -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
3 changes: 3 additions & 0 deletions .hyperi-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 14 additions & 0 deletions tests/TESTING.md
Original file line number Diff line number Diff line change
@@ -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.
Loading