Skip to content

Commit c2647c9

Browse files
authored
Merge pull request #115 from pkgjs/pkgjs-action
2 parents b57d7be + 9cb1390 commit c2647c9

File tree

2 files changed

+4
-34
lines changed

2 files changed

+4
-34
lines changed

.github/workflows/ci.yaml

+3-33
Original file line numberDiff line numberDiff line change
@@ -6,41 +6,11 @@ on:
66
push:
77
branches:
88
- main
9-
- master
109
pull_request:
1110

1211
jobs:
1312

1413
test:
15-
16-
runs-on: ubuntu-latest
17-
18-
strategy:
19-
matrix:
20-
node-version: [ 17, 16, 14, 12 ]
21-
22-
steps:
23-
- uses: actions/checkout@v2
24-
- uses: actions/setup-node@v2
25-
with:
26-
node-version: ${{ matrix.node-version }}
27-
- run: npm install
28-
- run: npm run tests-only
29-
env:
30-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31-
32-
lint:
33-
34-
runs-on: ubuntu-latest
35-
36-
strategy:
37-
matrix:
38-
node-version: [ 16 ]
39-
40-
steps:
41-
- uses: actions/checkout@v2
42-
- uses: actions/setup-node@v2
43-
with:
44-
node-version: ${{ matrix.node-version }}
45-
- run: npm install
46-
- run: npm run lint
14+
uses: pkgjs/action/.github/workflows/node-test.yaml@main
15+
secrets:
16+
test-secrets: '{"GITHUB_TOKEN":"${{ secrets.GITHUB_TOKEN }}"}'

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"action-wiby-test": "npm install --production && ./bin/wiby test",
1414
"action-wiby-result": "npm install --production && ./bin/wiby result",
1515
"lint": "standard",
16-
"pretest": "npm run lint",
16+
"pretest": "[ \"$NODE_LTS_LATEST\" != \"\" ] && [ \"$MATRIX_NODE_VERSION\" != \"$NODE_LTS_LATEST\" ] && echo 'Skipping linting' || npm run lint",
1717
"test": "npm run tests-only",
1818
"tests-only": "tap",
1919
"generate-docs": "./bin/generate-usage.js"

0 commit comments

Comments
 (0)