CI and testing
GitHub Actions for AXIS: unit coverage gate, Playwright smoke, worker typecheck, nightly full e2e.
This page
Abstract
AXIS quality gates live primarily under the repo root (Bun tests) and worker/tests/, orchestrated by GitHub Actions (.github/workflows/ci.yml, axis-nightly.yml). Deep test conventions are documented in Testing reference and TESTING.md.
Conceptual model
Rendering…
Interface surface — local commands
bun run test # tests/ + worker/tests/
bun run test:unit
bun run test:coverage:gate # lcov + scripts/check-coverage.mjs 95
bun run test:security
bun run test:e2e:smoke
bun run test:e2e:critical
bun run test:e2e
bun run test:all # gate + security
bun run test:bench # AXIS_BENCH=1 firehose (120s wall budget)
bun run perf:audit # typecheck + hot-path unit + benches → reports/perf-audit.json
bun run perf:audit:full # also full unit + Playwright @smoke
Worker:
cd worker
npm run typecheck
Repo Makefile:
bun run test:unit
make worker-typecheck
CI workflows
ci.yml (excerpted jobs)
| Job (names vary) | What |
|---|---|
| Frontend tests / coverage | Bun install, coverage, artifact axis-coverage-lcov |
axis-e2e | Playwright @smoke on PR |
| Firehose budget | bun run test:bench (AXIS_BENCH=1). Fails if 500k appendBar ticks on ~50k history exceed FIREHOSE_SOFT_BUDGET_MS (120 s) |
| Worker typecheck | worker tsc |
| Related | Python suite remains for pynescript core |
axis-nightly.yml
| Job | What |
|---|---|
| Playwright full | all e2e specs |
| Security + coverage gate | test:coverage:gate + test:security |
Schedule: 0 4 * * * UTC + workflow_dispatch.
Internals
| Path | Role |
|---|---|
TESTING.md | Authoritative testing guide |
scripts/check-coverage.mjs | Scoped line gate |
scripts/perf-audit.mjs | bun run perf:audit — typecheck, hot-path unit, AXIS_BENCH, JSON report |
playwright.config.ts | webServer build+preview :4173 |
e2e/ | Specs with @smoke / @critical tags |
worker/tests/ | auth, keys, scripts, runtime, http, proxy-router, rate-limit |
.github/workflows/ci.yml | PR gates |
.github/workflows/axis-nightly.yml | Nightly |
Coverage policy (summary)
- Gate: 95% lines on a scoped core (plugins, storage minus idb, store, results, sources, streams, data, selected chart helpers, worker auth/keys/runtime/scripts).
- Excluded from gate: heavy chart UI, pyodide boot, legacy JS, Solid
.tsxsurfaces (unit-tested elsewhere or deferred).
E2E design
- Builds production preview; baseURL
http://127.0.0.1:4173. - Mocks
/runand Binance where possible so smoke does not need live Pro API. - Selectors use
data-testid(axis-btn-load,axis-manager, …).
Storybook
bun run storybook (:6006) serves src/stories/ in isolation — visual review without Flask/Worker. Not a CI gate today.
Invariants & edge cases
- No real network in unit tests — mock
fetch/ WebSocket. - Import
./setupfirst when touching store/plugins. - CI Bun version pinned in workflows (e.g. 1.3).
- Playwright browsers installed with
--with-depson CI.
Failure modes
| CI red | Likely |
|---|---|
| Coverage gate | New untested code in scoped paths |
| Smoke timeout | Build slow; webServer 180s |
| Worker tsc | Env typing / DO exports |
| Flaky e2e | Missing testid; race without mock |