Skip to content

Commit 05d17f4

Browse files
committed
Separate lint from test in CI
1 parent feaaf8d commit 05d17f4

File tree

3 files changed

+32
-8
lines changed

3 files changed

+32
-8
lines changed

.github/workflows/lint.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- '**'
10+
11+
jobs:
12+
lint:
13+
name: Lint on Node.js LTS
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
20+
- uses: actions/setup-node@v3
21+
with:
22+
node-version: 'lts/*'
23+
24+
- run: npm ci
25+
26+
- name: Lint and Test
27+
run: npm run lint

.github/workflows/nodejs.yml renamed to .github/workflows/test.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: Test
22

33
on:
44
push:
@@ -10,7 +10,7 @@ on:
1010

1111
jobs:
1212
test:
13-
name: Lint and test on Node.js ${{ matrix.node }}
13+
name: Test on Node.js ${{ matrix.node }}
1414

1515
runs-on: ubuntu-latest
1616

@@ -26,10 +26,7 @@ jobs:
2626
with:
2727
node-version: ${{ matrix.node }}
2828

29-
- name: Install latest npm
30-
run: npm install --global npm@latest
31-
3229
- run: npm ci
3330

34-
- name: Lint and Test
31+
- name: Test
3532
run: npm test

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
"prettier-config-hudochenkov": "^0.3.0"
4242
},
4343
"scripts": {
44-
"test": "npm run lint && jest",
45-
"jest": "jest",
44+
"test-full": "npm run lint && jest",
45+
"test": "jest",
4646
"watch": "jest --watch",
4747
"coverage": "jest --coverage",
4848
"fix": "npm run lint -- --fix && prettier --write *.js 'lib/**/*.js'",

0 commit comments

Comments
 (0)