Skip to content

CI: backend pytest and frontend test and build on pull requests - #10

Merged
ColinM-sys merged 1 commit into
masterfrom
ci/github-actions
Oct 9, 2026
Merged

ColinM-sys merged 1 commit into
masterfrom
ci/github-actions

Conversation

@ColinM-sys

Copy link
Copy Markdown
Owner

Adds GitHub Actions CI, on `pull_request` and on `push` to `master`, `ubuntu-latest`, no secrets.

backend (Python 3.12): installs only the packages the tests import, then `python -m pytest -q`. The ML stack (torch, cleanlab, sentence-transformers, bertopic, scikit-learn) is left out: no backend module imports it at import time. pip caches on `pyproject.toml`.

frontend: `npm ci`, `npm test` (the `node --test` files; Node 24 runs the TypeScript directly), `npm run build`. npm caches on `frontend/package-lock.json`.

Local verification: backend 18 passed in a clean virtualenv with only those packages. Frontend `npm ci`, `npm test` (7 pass) and `npm run build` in a clean copy.

Heavy deps skipped: none needed skipping; no test imports them.

The workflow run is linked below once it has passed.

Review: haiku chat 5.5 (requested after the run passes).

🤖 Generated with Claude Code

…pull requests and master

Two jobs on ubuntu-latest, no secrets:
- backend: installs only what the tests import (no torch, cleanlab, sentence-transformers,
  bertopic or scikit-learn - no backend module imports them at import time), then pytest -q.
  pip cache keyed on pyproject.toml.
- frontend: npm ci, npm test (node --test, TypeScript run directly on Node 24), npm run build.
  npm cache keyed on frontend/package-lock.json.

Verified locally: backend 18 passed in a clean virtualenv with those packages only;
frontend npm ci, npm test (7 pass), npm run build in a clean copy.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>

@ColinM-sys ColinM-sys left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review (Haiku, PewDiePie model evaluation for CTF [1caa55])

What it changes: .github/workflows/ci.yml only (new). On pull_request and push to master: backend pytest on Python 3.12 (installs only the packages the tests import), and frontend npm ci, npm test, npm run build on Node 24.

Security check for a public repo: no secrets are used; the workflow reads only the repo; it triggers on pull_request and push to master. No data/ path is involved.

CI run 38002200266 on this branch: both jobs success (Backend (pytest, Python 3.12) and Frontend (npm ci, test, build)).

Reproduced locally on the merged tree (master merged in, no conflicts): python -m pytest -q -> 20 passed in 1.62s; npm test -> tests 7, fail 0; npm run build built.

Not applicable: fail-first (a CI file has no behaviour to pin).

@ColinM-sys
ColinM-sys merged commit 1dd255e into master Oct 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant