Separate CI check from local cached check

This commit is contained in:
murashit 2026-05-30 08:34:40 +09:00
parent 1c4f336f24
commit 31181ca27e
5 changed files with 8 additions and 5 deletions

View file

@ -11,7 +11,7 @@ permissions:
jobs:
check:
name: npm run check
name: npm run check:ci
runs-on: ubuntu-latest
steps:
@ -30,4 +30,4 @@ jobs:
run: npm ci --ignore-scripts
- name: Check
run: npm run check
run: npm run check:ci

View file

@ -36,7 +36,7 @@ jobs:
RELEASE_VERSION: ${{ github.ref_name }}
- name: Run checks and build
run: npm run check
run: npm run check:ci
- name: Generate artifact attestations
uses: actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4

View file

@ -8,6 +8,7 @@ npm run build
```
Run `npm run format` after edits and before `npm run check` so Prettier-only issues are fixed upfront. `npm run check` runs TypeScript type checking, unit tests, ESLint, Prettier check, and a production esbuild bundle.
The local `npm run check` path runs checks in parallel and uses ESLint's local cache. Use `npm run check:ci` when you need to reproduce the sequential, non-cached CI validation path.
`main.js`, `data.json`, and `node_modules/` are ignored by Git. `main.js` is still the file Obsidian loads, so run `npm run build` or `npm run build:prod` after source changes.

View file

@ -20,4 +20,4 @@ git push origin X.Y.Z
`release:prepare` updates the version files and creates a `## Changes` release notes template. `release:preflight` verifies the local Jujutsu/Git state, release metadata, lockfile, and full build once after the release commit is on `main`.
The release workflow runs `npm ci`, `npm run release:check`, `npm run check`, attaches the install assets, and generates GitHub artifact attestations for them. The release notes file is required and must contain a single `## Changes` section. If a tag-triggered release fails before creating the GitHub Release, fix the commit, move the local tag with `jj tag set --allow-move -r main X.Y.Z`, then update the remote tag with `git push --force origin X.Y.Z`.
The release workflow runs `npm ci`, `npm run release:check`, `npm run check:ci`, attaches the install assets, and generates GitHub artifact attestations for them. The release notes file is required and must contain a single `## Changes` section. If a tag-triggered release fails before creating the GitHub Release, fix the commit, move the local tag with `jj tag set --allow-move -r main X.Y.Z`, then update the remote tag with `git push --force origin X.Y.Z`.

View file

@ -25,12 +25,14 @@
"lint": "node scripts/run-parallel.mjs lint:ts lint:css",
"lint:css": "stylelint \"*.css\" \"src/**/*.css\" --max-warnings=0",
"lint:ts": "eslint src tests scripts \"*.config.ts\" \"*.config.mjs\" --max-warnings=0 --cache --cache-location node_modules/.cache/eslint/ --cache-strategy content",
"lint:ts:ci": "eslint src tests scripts \"*.config.ts\" \"*.config.mjs\" --max-warnings=0",
"release:check": "node scripts/check-release.mjs",
"release:preflight": "node scripts/preflight-release.mjs",
"release:prepare": "node scripts/prepare-release.mjs",
"test": "vitest run",
"typecheck": "tsc -p tsconfig.json --noEmit",
"check": "node scripts/run-parallel.mjs typecheck test lint:ts lint:css format:check && npm run build:prod"
"check": "node scripts/run-parallel.mjs typecheck test lint:ts lint:css format:check && npm run build:prod",
"check:ci": "npm run typecheck && npm run test && npm run lint:ts:ci && npm run lint:css && npm run format:check && npm run build:prod"
},
"devDependencies": {
"@eslint/js": "^10.0.1",