Skip to content

Commit 2a7d1f3

Browse files
committed
Split prettier/eslint CI jobs, unmask lint caches, require checks to merge
The lint job cached .eslintcache and node_modules/.cache/prettier with a bare lint- restore-key, so restored caches marked files clean against a stale tool version/config: main passed lint while a cold-cache run fails. It also carried continue-on-error, so failures never blocked anything. - Split lint into parallel prettier and eslint jobs so one failing never masks the other - Drop the lint result caches in CI entirely; run bunx prettier --check . and bunx eslint . un-cached (local lint script keeps --cache for speed) - Remove continue-on-error; these jobs become required status checks
1 parent bebe563 commit 2a7d1f3

1 file changed

Lines changed: 27 additions & 13 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ concurrency:
1111
cancel-in-progress: ${{ github.event_name != 'push' }}
1212

1313
jobs:
14-
lint:
14+
# Prettier and eslint run un-cached in CI: restored result caches can mark
15+
# files clean against a stale tool version or config, masking real failures.
16+
# The --cache flags in the package.json lint script remain for local speed.
17+
prettier:
1518
runs-on: ubuntu-latest
16-
# TODO(CL-6802 stage 2): flip blocking after the mechanical fix batch
17-
continue-on-error: true
1819
steps:
1920
- name: Checkout
2021
uses: actions/checkout@v4
@@ -33,18 +34,31 @@ jobs:
3334
- name: Install dependencies
3435
run: bun install --frozen-lockfile
3536

36-
- name: Cache lint
37+
- name: Prettier
38+
run: bunx prettier --check .
39+
40+
eslint:
41+
runs-on: ubuntu-latest
42+
steps:
43+
- name: Checkout
44+
uses: actions/checkout@v4
45+
46+
- name: Setup Bun
47+
uses: oven-sh/setup-bun@v2
48+
with:
49+
bun-version: "1.3.14"
50+
51+
- name: Cache dependencies
3752
uses: actions/cache@v4
3853
with:
39-
path: |
40-
.eslintcache
41-
node_modules/.cache/prettier
42-
key: lint-${{ github.sha }}
43-
restore-keys: |
44-
lint-
45-
46-
- name: Lint
47-
run: bun run lint
54+
path: node_modules
55+
key: bun-${{ hashFiles('bun.lock') }}
56+
57+
- name: Install dependencies
58+
run: bun install --frozen-lockfile
59+
60+
- name: ESLint
61+
run: bunx eslint .
4862

4963
typecheck:
5064
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)