Skip to content

Commit 6dbf5a2

Browse files
authored
fix ci/cd pipeline (#75)
* fix cicd pipeline * sudo install * upgrade npm for node 6 * change order
1 parent 7ae337b commit 6dbf5a2

File tree

2 files changed

+35
-18
lines changed

2 files changed

+35
-18
lines changed

.github/workflows/ci.yml

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,51 +17,66 @@ jobs:
1717
- name: Install Dependencies
1818
run: npm install
1919
- name: Test
20-
run: npm run test-in-browsers
20+
run: npm run test:browser
21+
22+
lint:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v3
26+
- uses: actions/setup-node@v3
27+
with:
28+
node-version: 18
29+
- name: Install Dependencies
30+
run: npm install --ignore-scripts
31+
- name: Lint
32+
run: npm run lint
33+
2134
test:
2235
runs-on: ubuntu-latest
2336
strategy:
2437
matrix:
2538
node-version:
39+
- 6
40+
- 8
2641
- 10
2742
- 11
2843
- 12
2944
- 13
3045
- 14
31-
- 15
3246
- 16
47+
- 18
3348
steps:
3449
- uses: actions/checkout@v3
3550
- name: Use Node.js ${{ matrix.node-version }}
3651
uses: actions/setup-node@v3
3752
with:
3853
node-version: ${{ matrix.node-version }}
54+
- name: Upgrade npm
55+
if: ${{ success() && matrix.node-version == '6' }}
56+
run: npm i npm@6.13.4 -g
3957
- name: Install Dependencies
4058
run: npm install --ignore-scripts
4159
- name: Test
42-
run: npm test
43-
test-legacy:
60+
run: npm run test:unit
61+
62+
typescript:
4463
runs-on: ubuntu-latest
45-
strategy:
46-
matrix:
47-
node-version:
48-
- 6
49-
- 8
5064
steps:
5165
- uses: actions/checkout@v3
52-
- name: Use Node.js ${{ matrix.node-version }}
53-
uses: actions/setup-node@v3
66+
- uses: actions/setup-node@v3
5467
with:
55-
node-version: ${{ matrix.node-version }}
68+
node-version: 18
5669
- name: Install Dependencies
5770
run: npm install --ignore-scripts
58-
- name: Test
59-
run: npm run test-legacy
71+
- name: tsd
72+
run: npm run test:typescript
73+
6074
automerge:
6175
needs:
76+
- lint
6277
- browsers
6378
- test
64-
- test-legacy
79+
- typescript
6580
runs-on: ubuntu-latest
6681
permissions:
6782
pull-requests: write

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@
66
"types": "index.d.ts",
77
"scripts": {
88
"benchmark": "cd benchmarks && npm install && npm run all",
9-
"test": "standard && tsd && nyc tape test.js",
10-
"test-in-browsers": "airtap test.js",
11-
"test-legacy": "nyc tape test.js"
9+
"lint": "standard",
10+
"test": "nyc tape test.js",
11+
"test:unit": "tape test.js",
12+
"test:typescript": "tsd",
13+
"test:browser": "airtap test.js"
1214
},
1315
"repository": {
1416
"type": "git",

0 commit comments

Comments
 (0)