From ec248b96f4f91eb4c5971dfec74d6d91f04b39cd Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Thu, 8 Apr 2021 15:11:38 -0700 Subject: [PATCH] [actions] use `node/install` instead of `node/run`; use `codecov` action --- .github/workflows/node-4+.yml | 16 ++++++++++------ .github/workflows/node-assert.yml | 22 ++++++++++++---------- .github/workflows/node-iojs.yml | 16 ++++++++++------ .github/workflows/node-pretest.yml | 12 ++++++------ .github/workflows/node-zero.yml | 16 ++++++++++------ .nycrc | 19 ++++--------------- 6 files changed, 52 insertions(+), 49 deletions(-) diff --git a/.github/workflows/node-4+.yml b/.github/workflows/node-4+.yml index 4c070dd..ce378c7 100644 --- a/.github/workflows/node-4+.yml +++ b/.github/workflows/node-4+.yml @@ -20,15 +20,18 @@ jobs: runs-on: ubuntu-latest strategy: + fail-fast: true 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' @@ -41,11 +44,12 @@ jobs: 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+' diff --git a/.github/workflows/node-assert.yml b/.github/workflows/node-assert.yml index 104dafd..97549de 100644 --- a/.github/workflows/node-assert.yml +++ b/.github/workflows/node-assert.yml @@ -17,13 +17,14 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: ljharb/actions/node/run@main - name: 'npm install && npm run tests-only' - env: - ASSERT: true + - 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 + env: + ASSERT: true + - uses: codecov/codecov-action@v1 assert-optional: name: 'assert: optional' @@ -40,13 +41,14 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: ljharb/actions/node/run@main - name: 'npm install && npm run tests-only' - env: - ASSERT: true + - 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 + env: + ASSERT: true + - uses: codecov/codecov-action@v1 assert: name: 'node: assert' diff --git a/.github/workflows/node-iojs.yml b/.github/workflows/node-iojs.yml index f707c3c..891b73d 100644 --- a/.github/workflows/node-iojs.yml +++ b/.github/workflows/node-iojs.yml @@ -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] @@ -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' diff --git a/.github/workflows/node-pretest.yml b/.github/workflows/node-pretest.yml index 3921e0a..969d138 100644 --- a/.github/workflows/node-pretest.yml +++ b/.github/workflows/node-pretest.yml @@ -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 diff --git a/.github/workflows/node-zero.yml b/.github/workflows/node-zero.yml index 2435bf2..18dcd1a 100644 --- a/.github/workflows/node-zero.yml +++ b/.github/workflows/node-zero.yml @@ -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] @@ -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' diff --git a/.nycrc b/.nycrc index dc6c3e5..5869cdb 100644 --- a/.nycrc +++ b/.nycrc @@ -4,25 +4,14 @@ ".cjs", ".mjs" ], - "include": [ - "*" - ], + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json", "lcov"], "exclude": [ "coverage", + "example", "test" ], - "reporter": [ - "text", - "html", - "json", - "lcov" - ], - "all": false, - "check-coverage": false, - "statements": 100, - "branches": 100, - "lines": 100, - "functions": 100, "sourceMap": true, "instrument": true }