Skip to content

ci: add pull-request checks - #105

Merged
rnv812 merged 1 commit into
masterfrom
ci/basic-checks
Oct 10, 2026
Merged

rnv812 merged 1 commit into
masterfrom
ci/basic-checks

Conversation

@rnv812

@rnv812 rnv812 commented Oct 10, 2026

Copy link
Copy Markdown
Member

Adds .github/workflows/ci.yml: one job on pull requests to master and develop and on pushes to master, with concurrency that cancels an older run of the same ref.

What runs

  1. Checkout (full history for the diff), pnpm from packageManager (10.29.3), Node lts/* with the pnpm store cache, pnpm install --frozen-lockfile.
  2. Prettier, changed files only: .js/.jsx/.ts/.tsx/.mjs/.cjs/.css files changed against the base branch (git diff --name-only --diff-filter=d origin/<base>...HEAD).
  3. ESLint, changed files only: the same diff filtered to JS/TS, --max-warnings 0 --no-warn-ignored.
  4. node scripts/check-hub-cards.mjs: new dependency-free script; fails when a card in lib/hub-data/generators/ has no single slug, a slug that differs from its file name, a duplicate slug, or is not imported in lib/hub-data/index.ts.
  5. pnpm types:check.
  6. pnpm build.

Why changed files only

The repository is not clean on current master:

  • prettier --check . reports 260 files: 208 of 218 .mdx, all 26 .json, 4 .md, 20 .ts/.tsx. MDX, JSON and Markdown are not kept in Prettier style, so they are left out of the check; otherwise nearly every content PR would fail on formatting it did not introduce.
  • pnpm lint --max-warnings 0 reports 79 errors in 33 files (12 components/routes/scripts, 21 hub cards).

A whole-repository check can replace the diff once these are cleaned up.

Note: 21 hub cards fail sonarjs/no-hardcoded-ip (sample events contain IP addresses) or unicorn/prefer-string-raw. A PR that adds or edits a card with sample IPs will fail ESLint until that rule is disabled for lib/hub-data/generators/** or the line is suppressed.

Local results on this branch (master + this commit)

Check Result Time
pnpm install --frozen-lockfile pass 15 s
Prettier, changed files pass 0.5 s
ESLint, changed files pass 1.3 s
check-hub-cards.mjs 149 hub cards OK (negative test with a duplicate and a mismatched slug fails as expected) 0.02 s
pnpm types:check pass 3.7 s
pnpm build pass 27 s

🤖 Generated with Claude Code

Run Prettier and ESLint on changed code files, the hub card check,
the type check and the build on pull requests to master and develop
and on pushes to master.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rnv812
rnv812 merged commit be63dbc into master Oct 10, 2026
1 check 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