Commit e24932f
Make CI check what it claims to check (#98)
* Make CI check what it claims to check
Four fixes, each for something currently unguarded.
1. YAML schema validation never validated anything.
The step ran three commands that all pointed at paths which do not exist:
npx yaml-ls-check .\articles
The backslashes are Windows separators. On the Ubuntu runner bash treats
`\a` as an escape, so the argument reaching the tool is `.articles`, and
the output was `Validating 0 YAML files. Validation complete.` with exit
0 on every run.
Correcting the paths alone would not have been enough. yaml-ls-check
reads its schema mapping from `<root>/.vscode/settings.json`, where
`<root>` is the directory passed on the command line, so
`yaml-ls-check articles` looks for `articles/.vscode/settings.json`,
finds nothing, and falls back to syntax-only checking. Relative roots
also break the mapping's `./schema/...` references, which resolve to
`/schema/...`. Passing the workspace as an absolute path is the form
that works: the schemas load and violations are reported. Against the
tree as it stands this validates 11 files, all passing.
The separate `npm install yaml-ls-check` step is gone. It installed the
entire project dependency tree as a side effect and wrote to
package.json and package-lock.json in CI; `npx --yes` fetches just the
tool.
2. Lint never ran anywhere.
`next build` does not lint, and no workflow invoked `npm run lint`, so
an ESLint or TypeScript upgrade could go green without its effect on the
lint rules ever being exercised.
3. No job had a timeout.
A stalled step therefore ran against GitHub's 6-hour default before
failing. This is not hypothetical: a `Validate YAML files` step recently
sat over six minutes on work that normally takes 24 seconds. The
deployment workflow is the more serious case, since its `pages`
concurrency group means one stuck run blocks every deployment queued
behind it.
4. Nothing checked where the lockfile resolves from.
A lockfile generated behind a corporate registry proxy records that
proxy's backing-feed URLs instead of registry.npmjs.org. Those hosts are
unreachable from public CI and by outside contributors, and the failure
appears far from its cause. The new step asserts every `resolved` URL
points at the public registry and prints the offenders when it fails.
Also adds a concurrency group so a rebase or force-push supersedes
in-flight pull request runs rather than leaving several racing on stale
commits. Pushes to main are never cancelled, so every default-branch
commit keeps a recorded result.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WWCBtvyCpxc2aqtyLDhDeE
* Exclude vendored Jekyll gems from lint
The new lint step failed on third-party JavaScript, not ours:
vendor/bundle/ruby/3.3.0/gems/jekyll-4.4.1/lib/jekyll/commands/serve/
livereload_assets/livereload.js
1:221 error Missing semicolon semi
ruby/setup-ruby runs with bundler-cache: true, which vendors gems into
vendor/bundle before the lint step, so ESLint sees Jekyll's minified
livereload.js. The directory is already in .gitignore, but ESLint flat
config does not read .gitignore, so the ignore has to be repeated in
eslint.config.mjs. This is invisible locally, where vendor/ does not
exist.
Also ignores .jekyll-cache and any _site output for the same reason.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WWCBtvyCpxc2aqtyLDhDeE
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 8acfddc commit e24932f
3 files changed
Lines changed: 48 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
| |||
132 | 136 | | |
133 | 137 | | |
134 | 138 | | |
| 139 | + | |
135 | 140 | | |
136 | 141 | | |
137 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
12 | 19 | | |
13 | 20 | | |
14 | 21 | | |
15 | 22 | | |
16 | 23 | | |
| 24 | + | |
17 | 25 | | |
18 | 26 | | |
19 | 27 | | |
20 | 28 | | |
21 | 29 | | |
22 | 30 | | |
23 | 31 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | 32 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
32 | 40 | | |
33 | 41 | | |
34 | 42 | | |
35 | 43 | | |
| 44 | + | |
36 | 45 | | |
37 | 46 | | |
38 | 47 | | |
| |||
47 | 56 | | |
48 | 57 | | |
49 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
50 | 75 | | |
51 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
52 | 81 | | |
53 | 82 | | |
54 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
13 | 20 | | |
14 | 21 | | |
15 | 22 | | |
| |||
0 commit comments