Skip to content

Commit 68178cd

Browse files
volinskeyclaude
andcommitted
ci: add push/PR test gate + CodeQL to the public packages repo
eleanor4devs-public previously had ONLY publish-all.yml, so the @eleanor4devs/* package tests ran only at publish time — not on push. That is how the install_hygiene break (Linux-only, skipped on the Windows dev box) reached the publish gate instead of being caught at its introducing push. - ci.yml: on push + PR to main, Node 20 + 22 — npm ci -> lint -> build -> typecheck -> npm test (ELEANOR4DEVS_SKIP_LIVE_NPM=1). Same step order as publish-all.yml's pre-publish gate, so CI mirrors the publish gate. - codeql.yml: javascript-typescript static analysis on push + PR + weekly, mirroring the sibling public repo kychee-com/run402-mcp. Brings eleanor4devs-public in line with run402-mcp (which already runs test.yml + codeql.yml on push). Verified the full sequence green locally first (lint/build/typecheck/test all exit 0). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 439fef9 commit 68178cd

2 files changed

Lines changed: 89 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: CI
2+
3+
# Regression gate for the @eleanor4devs/* packages. Runs the FULL test +
4+
# typecheck suite on every PR and every push to main — so package breakage is
5+
# caught at push time, not only at /publish (publish-all.yml's pre-publish
6+
# gate). Mirrors the convention used by the sibling public repo
7+
# kychee-com/run402-mcp (its test.yml) and the private repo's ci.yml.
8+
#
9+
# A workflow running is NOT the same as a workflow blocking: to make this a
10+
# required check (red CI prevents a merge), enable branch protection on `main`
11+
# requiring the "CI / Node / TypeScript (20)" + "(22)" checks
12+
# (Settings -> Branches, or `gh api`). See the repo's release docs.
13+
on:
14+
push:
15+
branches: [main]
16+
pull_request:
17+
branches: [main]
18+
19+
permissions:
20+
contents: read
21+
22+
concurrency:
23+
group: ci-${{ github.workflow }}-${{ github.ref }}
24+
cancel-in-progress: true
25+
26+
jobs:
27+
node:
28+
name: Node / TypeScript
29+
runs-on: ubuntu-latest
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
node: [20, 22]
34+
env:
35+
# Live-network tests (npm_published, cli_auth_live, cli_version_live,
36+
# voice_deploy, marketing_site) verify ALREADY-published/deployed
37+
# artifacts — they are post-publish checks, not pre-merge gates. Skip
38+
# them here, exactly as publish-all.yml's pre-publish test step does.
39+
ELEANOR4DEVS_SKIP_LIVE_NPM: "1"
40+
steps:
41+
- uses: actions/checkout@v4
42+
43+
- name: Setup Node ${{ matrix.node }}
44+
uses: actions/setup-node@v4
45+
with:
46+
node-version: ${{ matrix.node }}
47+
cache: npm
48+
49+
- name: Install dependencies
50+
run: npm ci
51+
52+
- name: Lint
53+
run: npm run lint
54+
55+
# Build BEFORE test: several tests spawn the built binary
56+
# (node packages/<pkg>/dist/cli.js), so dist/ must exist first — same
57+
# ordering as publish-all.yml's pre-test build step.
58+
- name: Build all packages
59+
run: npm run build --workspaces --if-present
60+
61+
- name: Type-check (tsc — src + tests, incl. expectTypeOf)
62+
run: npm run typecheck --workspaces --if-present
63+
64+
- name: Test (all workspaces)
65+
run: npm test

.github/workflows/codeql.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: CodeQL
2+
3+
# Static security analysis for the @eleanor4devs/* package sources. Mirrors the
4+
# sibling public repo kychee-com/run402-mcp's codeql.yml: on push + PR to main,
5+
# plus a weekly scheduled scan. Free for public repos.
6+
on:
7+
push:
8+
branches: [main]
9+
pull_request:
10+
branches: [main]
11+
schedule:
12+
- cron: '0 6 * * 1'
13+
14+
jobs:
15+
analyze:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
security-events: write
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: github/codeql-action/init@v3
22+
with:
23+
languages: javascript-typescript
24+
- uses: github/codeql-action/analyze@v3

0 commit comments

Comments
 (0)