Skip to content

Commit 3689b04

Browse files
committed
Add lint to GH Actions
1 parent ab9747c commit 3689b04

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed
Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test, build, publish
1+
name: Build, test, publish
22

33
on:
44
push:
@@ -9,7 +9,7 @@ env:
99
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1010

1111
jobs:
12-
test_and_build:
12+
build_and_test:
1313
runs-on: ubuntu-latest
1414
outputs:
1515
current_version: ${{ steps.version_check.outputs.current_version }}
@@ -27,12 +27,15 @@ jobs:
2727
- name: Install dependencies
2828
run: yarn install --immutable
2929

30-
- name: Test
31-
run: yarn test
30+
- name: Lint
31+
run: yarn lint
3232

3333
- name: Build
3434
run: yarn build
3535

36+
- name: Test
37+
run: yarn test
38+
3639
- name: Upload dist artifact
3740
uses: actions/upload-artifact@v4
3841
with:
@@ -48,8 +51,8 @@ jobs:
4851
4952
publish:
5053
runs-on: ubuntu-latest
51-
needs: test_and_build
52-
if: ${{ needs.test_and_build.outputs.current_version != needs.test_and_build.outputs.previous_version }}
54+
needs: build_and_test
55+
if: ${{ needs.build_and_test.outputs.current_version != needs.build_and_test.outputs.previous_version }}
5356
steps:
5457
- name: Checkout code
5558
uses: actions/checkout@v4

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
},
2424
"scripts": {
2525
"build": "node build.js",
26+
"lint": "eslint",
2627
"test": "mocha"
2728
},
2829
"keywords": [

0 commit comments

Comments
 (0)