Skip to content

ci: add lint + unit test workflow#3

Merged
Mathos34 merged 1 commit into
mainfrom
ci/cv-extract-json-workflow
Jun 2, 2026
Merged

ci: add lint + unit test workflow#3
Mathos34 merged 1 commit into
mainfrom
ci/cv-extract-json-workflow

Conversation

@Mathos34

@Mathos34 Mathos34 commented Jun 2, 2026

Copy link
Copy Markdown
Owner

Objective

Wire ruff + pytest into GitHub Actions so every push and PR gets a green check.

Changes

  • New .github/workflows/ci.yml: single job, ubuntu-latest, 10-minute timeout.
    • Python 3.11 with pip cache.
    • Installs only the deps the test path actually needs: ruff, pytest, pydantic, faker.
    • ruff check . then pytest -q tests/.

Validation

  • python -m ruff check . locally: clean.
  • python -m pytest -q tests/ locally: 12 tests pass.
  • YAML inspected by hand. Will be exercised on this PRs first run.

Risk

low. Pure additive workflow file. No source modification.

Out of scope

  • Installing transformers, torch, sentencepiece, protobuf. These are needed by train.py and scripts/demo.py but not by tests/; keeping them out of CI keeps each run fast. A future "integration" job can add them if we add a model-loading smoke test.
  • Matrix over multiple Python versions.
  • README CI badge (separate follow-up PR after this workflow has a green run on main).

Tracked item: cv-extract-json CI workflow.

Runs on push to main and on every PR. Installs only what the unit
test path needs: ruff, pytest, pydantic, faker. The transformers
backbone and torch are NOT installed in CI: they are needed by
train.py / scripts/demo.py but the current test suite exercises only
the verbatim normalize + verify logic and the synthetic generator.

ruff check . + pytest -q tests/, ubuntu-latest, Python 3.11, pip
cache. 10-minute timeout (more than enough for the current ~1 s
test run).
@Mathos34 Mathos34 merged commit 7ddb593 into main Jun 2, 2026
1 check passed
@Mathos34 Mathos34 deleted the ci/cv-extract-json-workflow branch June 2, 2026 14:30
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