Commit cdd085a
authored
ci: run the unit tests, and align the ruff pin with CI (#84)
## Unit tests were never executed (#73)
`lint.yml` delegates to the skill-repo-skill reusable, whose steps are
skill validation, manifest sync, markdownlint, yamllint, actionlint,
shellcheck, ruff and checkpoint schemas. Ruff parses the test files.
Nothing runs them.
Both suites — `_lib/test_formatting.py` and
`scripts/test_matrix_doctor.py`, 54 tests between them — have been
passing locally and proving nothing about any pull request.
The job runs each test file directly instead of using discovery, and
that is deliberate:
```
$ python3 -m unittest discover -s skills -p 'test_*.py'
Ran 0 tests in 0.000s
NO TESTS RAN
$ echo $?
0
```
The skill directories are not importable packages (hyphens in the
names), so discovery rooted above `scripts/` collects nothing and exits
0 while doing it. A discovery-based job would have gone green without
running a test — the same failure mode as the bug it is meant to catch.
The job therefore also fails a file that reports `Ran 0 tests`.
Verified locally against both suites:
```
--- skills/matrix-communication/scripts Ran 34 tests OK
--- skills/matrix-communication/scripts/_lib Ran 20 tests OK
```
Stdlib only, so the job needs no dependency install.
## ruff pin drift (#75)
`.pre-commit-config.yaml` pinned `ruff-pre-commit` at v0.15.14 while the
reusable CI workflow runs `uvx --no-build ruff@0.16.0`. `ISC004` does
not exist in the older one, so a commit passed the hook and failed CI —
that happened on #74 in this repo.
Bumped to v0.16.0, with a comment naming the coupling. This aligns the
two today; it does not enforce the pairing, because the CI version lives
in `netresearch/skill-repo-skill` behind its own `# renovate:` comment
and Renovate bumps each side independently. #75 keeps the structural
question open.
## Not addressed
The repo header states a CI/Hook Parity Principle — "every hook below
ALSO runs in CI". The reverse now holds too, in the sense that this job
has no hook counterpart: tests do not run on commit. That is deliberate
(a pre-commit hook running the suites would slow every commit for a repo
whose tests are this cheap to run in CI), but it is worth naming rather
than leaving as an inconsistency someone finds later.2 files changed
Lines changed: 74 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
52 | 56 | | |
53 | | - | |
| 57 | + | |
54 | 58 | | |
55 | 59 | | |
56 | 60 | | |
| |||
0 commit comments