Skip to content

Commit 60f1ba7

Browse files
committed
chore(ci): added node-setup
1 parent 3b1bc51 commit 60f1ba7

File tree

3 files changed

+20
-13
lines changed

3 files changed

+20
-13
lines changed

.github/workflows/check-dist.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ on:
1010
branches:
1111
- main
1212
paths-ignore:
13-
- '**.md'
13+
- "**.md"
1414
pull_request:
1515
paths-ignore:
16-
- '**.md'
16+
- "**.md"
1717
workflow_dispatch:
1818

1919
jobs:
@@ -29,10 +29,10 @@ jobs:
2929
node-version: 16.x
3030

3131
- name: Install dependencies
32-
run: npm ci
32+
run: yarn install
3333

3434
- name: Rebuild the dist/ directory
35-
run: npm run prepare
35+
run: yarn run prepare
3636

3737
- name: Compare the expected and actual dist/ directories
3838
run: |

.github/workflows/test.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,26 @@ on:
44
push:
55
branches:
66
- main
7-
- 'releases/*'
7+
- "releases/*"
88

99
jobs:
1010
# unit tests
1111
units:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v3
15-
- run: npm ci
16-
- run: npm test
14+
- uses: actions/checkout@v3
15+
- name: Setup node
16+
uses: actions/setup-node@v3
17+
with:
18+
node-version-file: .node-version
19+
- run: yarn install
20+
- run: yarn test
1721

1822
# test action works running from the graph
1923
test:
2024
runs-on: ubuntu-latest
2125
steps:
22-
- uses: actions/checkout@v3
23-
- uses: ./
24-
with:
25-
milliseconds: 1000
26+
- uses: actions/checkout@v3
27+
- uses: ./
28+
with:
29+
milliseconds: 1000

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33
"version": "1.0.0",
44
"description": "JavaScript Action Template",
55
"main": "index.js",
6+
"engines": {
7+
"node": "^16"
8+
},
69
"scripts": {
710
"lint": "eslint .",
811
"prepare": "ncc build index.js -o dist --source-map --license licenses.txt",
912
"test": "jest",
10-
"all": "npm run lint && npm run prepare && npm run test"
13+
"all": "yarn lint && yarn prepare && yarn test"
1114
},
1215
"repository": {
1316
"type": "git",

0 commit comments

Comments
 (0)