Skip to content

Commit 1ee3d1b

Browse files
authored
ci: split lint, format tasks into jobs (#7089)
* ci: split linting task into separate CI job * ci: split prettier task into separate CI job * refactor: don't run format in test task
1 parent 1c5db59 commit 1ee3d1b

File tree

4 files changed

+51
-10
lines changed

4 files changed

+51
-10
lines changed

.github/workflows/format.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Format
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
10+
jobs:
11+
format:
12+
runs-on: ubuntu-24.04
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: 18.14.0
19+
cache: npm
20+
21+
- name: Install dependencies
22+
run: npm ci --no-audit
23+
24+
- name: Lint
25+
run: npm run format:check

.github/workflows/lint.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Lint
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
10+
jobs:
11+
lint:
12+
runs-on: ubuntu-24.04
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: 18.14.0
19+
cache: npm
20+
21+
- name: Install dependencies
22+
run: npm ci --no-audit
23+
24+
- name: Lint
25+
run: npm run lint

.github/workflows/unit-tests.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,6 @@ jobs:
4040
- name: Install core dependencies
4141
run: npm ci --no-audit
4242
if: '${{!steps.release-check.outputs.IS_RELEASE}}'
43-
44-
- name: Formatting
45-
run: npm run format:check
46-
if: '${{!steps.release-check.outputs.IS_RELEASE}}'
47-
48-
- name: Linting
49-
run: npm run lint
50-
if: '${{!steps.release-check.outputs.IS_RELEASE}}'
51-
5243
- name: Run unit tests
5344
uses: nick-fields/retry@v3
5445
with:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"start": "node ./bin/run.js",
3636
"build": "tsc",
3737
"dev": "tsc --watch",
38-
"test": "run-s format test:dev",
38+
"test": "npm run test:dev",
3939
"format": "npm run _format -- --write",
4040
"format:check": "npm run _format -- --check",
4141
"lint": "eslint --cache \"{src,scripts,tests,.github}/**/*.{mjs,cjs,js,md,html}\" \"*.{mjs,cjs,js,md,html}\"",

0 commit comments

Comments
 (0)