Skip to content

CI on pull requests, and the CI checklist's checks (sc-9610) - #6

Open
ndbroadbent wants to merge 3 commits into
mainfrom
nathan/sc-9610/ci-checks
Open

ndbroadbent wants to merge 3 commits into
mainfrom
nathan/sc-9610/ci-checks

Conversation

@ndbroadbent

@ndbroadbent ndbroadbent commented Dec 5, 2026 •

Copy link
Copy Markdown
Member

At a glance

  • CI on every pull request and on main (.github/workflows/ci.yml). The repo had none.
  • One command, mise run ci (scripts/ci.sh), runs what CI runs. The pre-push hook runs it, and so does npm run push, before it pushes a version to Zapier.
  • Formatting: oxfmt in a pre-commit hook (lefthook.yml), set to the code's existing style (no semicolons, single quotes, 80 columns). CI has no format check.
  • Code: the type check's and oxlint's findings are fixed (optional parameters, an export mixed with module.exports, unused catch bindings, spreads with an empty fallback). The repeated test setups jscpd found become helpers, and two resources share one list of output fields. The 250 tests pass unchanged.
  • Runtime dependency: zapier-platform-core 19.1.0 → 19.3.0, which pins the fixed form-data 4.0.6 (GHSA-hmw2-7cc7-3qxx). It reaches Zapier with the next npm run push; nothing is pushed by this PR.
  • Dev dependencies: Jest 29 → 30, plus oxlint, oxfmt, Knip, jscpd and TypeScript.
  • No version bump and no changelog entry.

Checks added (sc-9610)

Check Tool
Type check tsc on the JavaScript (checkJs), with Zapier's and Jest's types
Lint oxlint, warnings fail
Unit tests in CI, coverage floor Jest: statements 96%, branches 85%, functions 98%, lines 97% (today 96.9 / 85.7 / 98.7 / 97.7)
Smoke test scripts/smoke_test.js: Zapier's own validation of the app (what zapier-platform validate runs, through zapier-platform-core), a CHANGELOG.md entry for the version, and .env ignored by git so a push never uploads it
Dead code, unused dependencies Knip
Copy-paste jscpd: any clone of 8 lines or more fails. Two clones that are only shared require lines have ignore markers with a comment
File length scripts/check_file_length.sh (500 code, 1000 tests)
Lint suppressions scripts/check_lint_suppressions.sh: none allowed
Spelling typos (one deliberate misspelling in a test is allowed in _typos.toml)
Workflows actionlint, zizmor; actions pinned to SHAs with pinact
Secrets Betterleaks over the whole history, in the hook and CI. Its one finding, the tests' fixture PDF password, is allowlisted by exact value
Dependency advisories scripts/check_audit.mjs: npm audit minus audit-ignores.json, each ignore with a reason and an expiry of at most six months; it fails on an expired ignore or one that no longer matches. Today: cross-spawn (Jest's, Windows only, fixed release under 7 days old) and glob and minimatch inside Jest 30's own version ranges, all dev only
Licences scripts/check_licences.mjs: the runtime dependencies must be permissive, reading SPDX expressions with their grouping. Zapier's SDK (the Zapier Platform Agreement) and three of its dependencies are named exceptions with reasons
Dependency updates Dependabot, npm and GitHub Actions, with a 7-day cooldown

zapier-platform-cli isn't added as a dev dependency: it brings several hundred packages, many with advisories, into the audit. AGENTS.md lists the checks.

Not in this PR

  • GitHub push protection: already on for this repository (checked 5 Dec 2026).
  • A red main reaching someone: CI results reach Fleetlayer through the DocSpring organisation's webhook. Subscribing a session to its failures is the coordinator's job.
  • The globally installed Zapier CLI is 19.1.0, and the app is now on core 19.3.0. Update the CLI (npm install -g zapier-platform-cli@19.3.0) before the next npm run push.

Testing

  • mise run ci passes locally, and the pre-push hook ran it on this push.
  • jscpd's threshold was checked against a planted 20-line copy in the n8n repository's PR. Zapier's validation was checked against a planted bad noun.

AI review: codex review (1 round), last run on cdcd823. 1 finding, fixed: the licence check ignored the grouping in SPDX expressions (eb8df8c, also fixed in the n8n PR).


Get evidence
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…ode was written) and fix oxlint's findings: unused catch bindings, spreads with an empty fallback, and an unused test helper (sc-9610)
… to Zapier: a type check of the JavaScript, oxlint, a coverage floor, a smoke test (Zapier's validation, a changelog entry for the version, .env kept out of the upload), Knip, jscpd, file lengths, lint suppressions, typos, actionlint, zizmor, Betterleaks, npm audit with expiring ignores and a licence check; oxfmt and fixes in a pre-commit hook; Dependabot with a 7-day cooldown. The repeated test setups jscpd found become helpers, the shared output fields one list, and the type check's findings are fixed. zapier-platform-core 19.3.0 (a fixed form-data) and Jest 30 (sc-9610)
… Apache-2.0) AND GPL-3.0-only isn't allowed (sc-9610)
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