Skip to content

Commit ede1028

Browse files
committed
[actions] use node/install instead of node/run; use codecov action
1 parent 6f7640e commit ede1028

File tree

5 files changed

+37
-28
lines changed

5 files changed

+37
-28
lines changed

.github/workflows/node-4+.yml

+11-6
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,18 @@ jobs:
2020
runs-on: ubuntu-latest
2121

2222
strategy:
23+
fail-fast: false
2324
matrix: ${{ fromJson(needs.matrix.outputs.latest) }}
2425

2526
steps:
2627
- uses: actions/checkout@v2
27-
- uses: ljharb/actions/node/run@main
28-
name: 'npm install && npm run tests-only'
28+
- uses: ljharb/actions/node/install@main
29+
name: 'nvm install ${{ matrix.node-version }} && npm install'
2930
with:
3031
node-version: ${{ matrix.node-version }}
31-
command: 'tests-only'
32+
- run: npm run tests-only
33+
- uses: codecov/codecov-action@v1
34+
3235
minors:
3336
needs: [matrix, latest]
3437
name: 'non-latest minors'
@@ -37,15 +40,17 @@ jobs:
3740
runs-on: ubuntu-latest
3841

3942
strategy:
43+
fail-fast: false
4044
matrix: ${{ fromJson(needs.matrix.outputs.minors) }}
4145

4246
steps:
4347
- uses: actions/checkout@v2
44-
- uses: ljharb/actions/node/run@main
45-
name: 'npm install && npm run tests-only'
48+
- uses: ljharb/actions/node/install@main
49+
name: 'nvm install ${{ matrix.node-version }} && npm install'
4650
with:
4751
node-version: ${{ matrix.node-version }}
48-
command: 'tests-only'
52+
- run: npm run tests-only
53+
- uses: codecov/codecov-action@v1
4954

5055
node:
5156
name: 'node 4+'

.github/workflows/node-iojs.yml

+10-6
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,18 @@ jobs:
2020
runs-on: ubuntu-latest
2121

2222
strategy:
23+
fail-fast: false
2324
matrix: ${{ fromJson(needs.matrix.outputs.latest) }}
2425

2526
steps:
2627
- uses: actions/checkout@v2
27-
- uses: ljharb/actions/node/run@main
28-
name: 'npm install && npm run tests-only'
28+
- uses: ljharb/actions/node/install@main
29+
name: 'nvm install ${{ matrix.node-version }} && npm install'
2930
with:
3031
node-version: ${{ matrix.node-version }}
31-
command: 'tests-only'
3232
skip-ls-check: true
33+
- run: npm run tests-only
34+
- uses: codecov/codecov-action@v1
3335

3436
minors:
3537
needs: [matrix, latest]
@@ -39,16 +41,18 @@ jobs:
3941
runs-on: ubuntu-latest
4042

4143
strategy:
44+
fail-fast: false
4245
matrix: ${{ fromJson(needs.matrix.outputs.minors) }}
4346

4447
steps:
4548
- uses: actions/checkout@v2
46-
- uses: ljharb/actions/node/run@main
47-
name: 'npm install && npm run tests-only'
49+
- uses: ljharb/actions/node/install@main
50+
name: 'nvm install ${{ matrix.node-version }} && npm install'
4851
with:
4952
node-version: ${{ matrix.node-version }}
50-
command: 'tests-only'
5153
skip-ls-check: true
54+
- run: npm run tests-only
55+
- uses: codecov/codecov-action@v1
5256

5357
node:
5458
name: 'io.js'

.github/workflows/node-pretest.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ jobs:
88

99
steps:
1010
- uses: actions/checkout@v2
11-
- uses: ljharb/actions/node/run@main
12-
name: 'npm install && npm run pretest'
11+
- uses: ljharb/actions/node/install@main
12+
name: 'nvm install lts/* && npm install'
1313
with:
1414
node-version: 'lts/*'
15-
command: 'pretest'
15+
- run: npm run pretest
1616

1717
posttest:
1818
runs-on: ubuntu-latest
1919

2020
steps:
2121
- uses: actions/checkout@v2
22-
- uses: ljharb/actions/node/run@main
23-
name: 'npm install && npm run posttest'
22+
- uses: ljharb/actions/node/install@main
23+
name: 'nvm install lts/* && npm install'
2424
with:
2525
node-version: 'lts/*'
26-
command: 'posttest'
26+
- run: npm run posttest

.github/workflows/node-zero.yml

+10-6
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,19 @@ jobs:
2020
runs-on: ubuntu-latest
2121

2222
strategy:
23+
fail-fast: false
2324
matrix: ${{ fromJson(needs.matrix.outputs.stable) }}
2425

2526
steps:
2627
- uses: actions/checkout@v2
27-
- uses: ljharb/actions/node/run@main
28-
name: 'npm install && npm run tests-only'
28+
- uses: ljharb/actions/node/install@main
29+
name: 'nvm install ${{ matrix.node-version }} && npm install'
2930
with:
3031
node-version: ${{ matrix.node-version }}
31-
command: 'tests-only'
3232
cache-node-modules-key: node_modules-${{ github.workflow }}-${{ github.action }}-${{ github.run_id }}
3333
skip-ls-check: true
34+
- run: npm run tests-only
35+
- uses: codecov/codecov-action@v1
3436

3537
unstable:
3638
needs: [matrix, stable]
@@ -40,17 +42,19 @@ jobs:
4042
runs-on: ubuntu-latest
4143

4244
strategy:
45+
fail-fast: false
4346
matrix: ${{ fromJson(needs.matrix.outputs.unstable) }}
4447

4548
steps:
4649
- uses: actions/checkout@v2
47-
- uses: ljharb/actions/node/run@main
48-
name: 'npm install && npm run tests-only'
50+
- uses: ljharb/actions/node/install@main
51+
name: 'nvm install ${{ matrix.node-version }} && npm install'
4952
with:
5053
node-version: ${{ matrix.node-version }}
51-
shell-command: 'if [ "${{ matrix.node-version }}" = "0.6" ]; then ./node_modules/.bin/tape "test/**/*.js"; else npm run tests-only; fi'
5254
cache-node-modules-key: node_modules-${{ github.workflow }}-${{ github.action }}-${{ github.run_id }}
5355
skip-ls-check: true
56+
- run: npm run tests-only
57+
- uses: codecov/codecov-action@v1
5458

5559
node:
5660
name: 'node 0.x'

.nycrc

-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
"all": true,
33
"check-coverage": false,
44
"reporter": ["text-summary", "text", "html", "json"],
5-
"lines": 86,
6-
"statements": 85.93,
7-
"functions": 82.43,
8-
"branches": 76.06,
95
"exclude": [
106
"coverage",
117
"test"

0 commit comments

Comments
 (0)