Skip to content

Commit

Permalink
[actions] use node/install instead of node/run; use codecov action
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Apr 17, 2021
1 parent e52ee09 commit 4bfec2e
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 28 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/node-4+.yml
Expand Up @@ -20,15 +20,18 @@ jobs:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix: ${{ fromJson(needs.matrix.outputs.latest) }}

steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/run@main
name: 'npm install && npm run tests-only'
- uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install'
with:
node-version: ${{ matrix.node-version }}
command: 'tests-only'
- run: npm run tests-only
- uses: codecov/codecov-action@v1

minors:
needs: [matrix, latest]
name: 'non-latest minors'
Expand All @@ -37,15 +40,17 @@ jobs:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix: ${{ fromJson(needs.matrix.outputs.minors) }}

steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/run@main
name: 'npm install && npm run tests-only'
- uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install'
with:
node-version: ${{ matrix.node-version }}
command: 'tests-only'
- run: npm run tests-only
- uses: codecov/codecov-action@v1

node:
name: 'node 4+'
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/node-iojs.yml
Expand Up @@ -20,16 +20,18 @@ jobs:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix: ${{ fromJson(needs.matrix.outputs.latest) }}

steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/run@main
name: 'npm install && npm run tests-only'
- uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install'
with:
node-version: ${{ matrix.node-version }}
command: 'tests-only'
skip-ls-check: true
- run: npm run tests-only
- uses: codecov/codecov-action@v1

minors:
needs: [matrix, latest]
Expand All @@ -39,16 +41,18 @@ jobs:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix: ${{ fromJson(needs.matrix.outputs.minors) }}

steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/run@main
name: 'npm install && npm run tests-only'
- uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install'
with:
node-version: ${{ matrix.node-version }}
command: 'tests-only'
skip-ls-check: true
- run: npm run tests-only
- uses: codecov/codecov-action@v1

node:
name: 'io.js'
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/node-pretest.yml
Expand Up @@ -8,19 +8,19 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/run@main
name: 'npm install && npm run pretest'
- uses: ljharb/actions/node/install@main
name: 'nvm install lts/* && npm install'
with:
node-version: 'lts/*'
command: 'pretest'
- run: npm run pretest

posttest:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/run@main
name: 'npm install && npm run posttest'
- uses: ljharb/actions/node/install@main
name: 'nvm install lts/* && npm install'
with:
node-version: 'lts/*'
command: 'posttest'
- run: npm run posttest
16 changes: 10 additions & 6 deletions .github/workflows/node-zero.yml
Expand Up @@ -20,17 +20,19 @@ jobs:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix: ${{ fromJson(needs.matrix.outputs.stable) }}

steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/run@main
name: 'npm install && npm run tests-only'
- uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install'
with:
node-version: ${{ matrix.node-version }}
command: 'tests-only'
cache-node-modules-key: node_modules-${{ github.workflow }}-${{ github.action }}-${{ github.run_id }}
skip-ls-check: true
- run: npm run tests-only
- uses: codecov/codecov-action@v1

unstable:
needs: [matrix, stable]
Expand All @@ -40,17 +42,19 @@ jobs:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix: ${{ fromJson(needs.matrix.outputs.unstable) }}

steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/run@main
name: 'npm install && npm run tests-only'
- uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install'
with:
node-version: ${{ matrix.node-version }}
command: 'tests-only'
cache-node-modules-key: node_modules-${{ github.workflow }}-${{ github.action }}-${{ github.run_id }}
skip-ls-check: true
- run: npm run tests-only
- uses: codecov/codecov-action@v1

node:
name: 'node 0.x'
Expand Down
4 changes: 0 additions & 4 deletions .nycrc
Expand Up @@ -4,10 +4,6 @@
"instrumentation": false,
"sourceMap": false,
"reporter": ["text-summary", "text", "html", "json"],
"lines": 93,
"statements": 93,
"functions": 96,
"branches": 89,
"exclude": [
"coverage",
"example",
Expand Down

0 comments on commit 4bfec2e

Please sign in to comment.