diff --git a/.github/workflows/node-4+.yml b/.github/workflows/node-4+.yml index 6d8bd48..aedd412 100644 --- a/.github/workflows/node-4+.yml +++ b/.github/workflows/node-4+.yml @@ -24,25 +24,11 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: dcodeIO/setup-node-nvm@master - name: Use Node.js ${{ matrix.node-version }} + - uses: ljharb/actions/node/run@main + name: 'npm install && npm run tests-only' with: node-version: ${{ matrix.node-version }} - - name: 'upgrade npm, npm install' - run: | - . /home/runner/mynvm/nvm.sh - nvm install-latest-npm - export CI_RESET_NODE_VERSION=1 - case "${{ matrix.node-version }}" in - 0.5|0.5.*|0.6|0.6.*|0.7|0.7.*|0.9|0.9.*) nvm install --latest-npm 0.8 ;; - 5.*|6.1|6.2 ) nvm install --latest-npm 6 ;; - 9.0|9.1|9.2 ) nvm install --latest-npm 9 ;; - * ) export CI_RESET_NODE_VERSION=0 ;; - esac - npm install - if [ "${CI_RESET_NODE_VERSION-}" = 1 ]; then nvm use "${{ matrix.node-version }}"; fi - - run: npm run tests-only - - run: if [ -f coverage/*.json ]; then bash <(curl -s https://codecov.io/bash) -f coverage/*.json; fi + command: 'tests-only' minors: needs: [matrix, latest] name: 'non-latest minors' @@ -55,25 +41,10 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: dcodeIO/setup-node-nvm@master - name: Use Node.js ${{ matrix.node-version }} + - uses: ljharb/actions/node/run@main with: node-version: ${{ matrix.node-version }} - - name: 'upgrade npm, npm install' - run: | - . /home/runner/mynvm/nvm.sh - nvm install-latest-npm - export CI_RESET_NODE_VERSION=1 - case "${{ matrix.node-version }}" in - 0.5|0.5.*|0.6|0.6.*|0.7|0.7.*|0.9|0.9.*) nvm install --latest-npm 0.8 ;; - 5.*|6.1|6.2 ) nvm install --latest-npm 6 ;; - 9.0|9.1|9.2 ) nvm install --latest-npm 9 ;; - * ) export CI_RESET_NODE_VERSION=0 ;; - esac - npm install - if [ "${CI_RESET_NODE_VERSION-}" = 1 ]; then nvm use "${{ matrix.node-version }}"; fi - - run: npm run tests-only - - run: if [ -f coverage/*.json ]; then bash <(curl -s https://codecov.io/bash) -f coverage/*.json; fi + command: 'tests-only' node: name: 'node 4+' diff --git a/.github/workflows/node-iojs.yml b/.github/workflows/node-iojs.yml index 98dd7c7..dae1152 100644 --- a/.github/workflows/node-iojs.yml +++ b/.github/workflows/node-iojs.yml @@ -24,15 +24,11 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: dcodeIO/setup-node-nvm@master - name: Use Node.js ${{ matrix.node-version }} + - uses: ljharb/actions/node/run@main + name: 'npm install && npm run tests-only' with: node-version: ${{ matrix.node-version }} - - name: 'upgrade npm, npm install' - run: . /home/runner/mynvm/nvm.sh && nvm install-latest-npm - - run: npm install - - run: npm run tests-only - - run: if [ -f coverage/*.json ]; then bash <(curl -s https://codecov.io/bash) -f coverage/*.json; fi + command: 'tests-only' minors: needs: [matrix, latest] name: 'non-latest minors' @@ -45,29 +41,11 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: dcodeIO/setup-node-nvm@master - name: Use Node.js ${{ matrix.node-version }} + - uses: ljharb/actions/node/run@main + name: 'npm install && npm run tests-only' with: node-version: ${{ matrix.node-version }} - - name: 'upgrade npm, npm install' - run: | - . /home/runner/mynvm/nvm.sh - case "${{ matrix.node-version }}" in - 0.* ) export NPM_CONFIG_STRICT_SSL=false ;; - esac - nvm install-latest-npm - export CI_RESET_NODE_VERSION=1 - case "${{ matrix.node-version }}" in - 0.5|0.5.*|0.6|0.6.*|0.7|0.7.*|0.9|0.9.*) nvm install --latest-npm 0.8 ;; - 5.*|6.1|6.2 ) nvm install --latest-npm 6 ;; - 9.0|9.1|9.2 ) nvm install --latest-npm 9 ;; - * ) export CI_RESET_NODE_VERSION=0 ;; - esac - npm install - if [ "${CI_RESET_NODE_VERSION-}" = 1 ]; then nvm use "${{ matrix.node-version }}"; fi - - run: npm install - - run: npm run tests-only - - run: if [ -f coverage/*.json ]; then bash <(curl -s https://codecov.io/bash) -f coverage/*.json; fi + command: 'tests-only' node: name: 'io.js' diff --git a/.github/workflows/node-pretest.yml b/.github/workflows/node-pretest.yml index 0483890..d6bed12 100644 --- a/.github/workflows/node-pretest.yml +++ b/.github/workflows/node-pretest.yml @@ -9,47 +9,19 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: dcodeIO/setup-node-nvm@master - name: Use Node.js `lts/*` + - uses: ljharb/actions/node/run@main + name: 'npm install && npm run pretest' with: - node-version: "lts/*" - - name: 'upgrade npm, npm install' - run: | - . /home/runner/mynvm/nvm.sh - nvm install-latest-npm - export CI_RESET_NODE_VERSION=1 - case "${{ matrix.node-version }}" in - 0.5|0.5.*|0.6|0.6.*|0.7|0.7.*|0.9|0.9.*) nvm install --latest-npm 0.8 ;; - 5.*|6.1|6.2 ) nvm install --latest-npm 6 ;; - 9.0|9.1|9.2 ) nvm install --latest-npm 9 ;; - * ) export CI_RESET_NODE_VERSION=0 ;; - esac - npm install - if [ "${CI_RESET_NODE_VERSION-}" = 1 ]; then nvm use "${{ matrix.node-version }}"; fi - - run: npm run pretest - - run: if [ -f coverage/*.json ]; then bash <(curl -s https://codecov.io/bash) -f coverage/*.json; fi + node-version: 'lts/*' + command: 'pretest' posttest: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: dcodeIO/setup-node-nvm@master - name: Use Node.js `lts/*` + - uses: ljharb/actions/node/run@main + name: 'npm install && npm run posttest' with: - node-version: "lts/*" - - name: 'upgrade npm, npm install' - run: | - . /home/runner/mynvm/nvm.sh - nvm install-latest-npm - export CI_RESET_NODE_VERSION=1 - case "${{ matrix.node-version }}" in - 0.5|0.5.*|0.6|0.6.*|0.7|0.7.*|0.9|0.9.*) nvm install --latest-npm 0.8 ;; - 5.*|6.1|6.2 ) nvm install --latest-npm 6 ;; - 9.0|9.1|9.2 ) nvm install --latest-npm 9 ;; - * ) export CI_RESET_NODE_VERSION=0 ;; - esac - npm install - if [ "${CI_RESET_NODE_VERSION-}" = 1 ]; then nvm use "${{ matrix.node-version }}"; fi - - run: npm run posttest - - run: if [ -f coverage/*.json ]; then bash <(curl -s https://codecov.io/bash) -f coverage/*.json; fi \ No newline at end of file + node-version: 'lts/*' + command: 'posttest' \ No newline at end of file diff --git a/.github/workflows/node-zero.yml b/.github/workflows/node-zero.yml index 71207f3..d8d8f8c 100644 --- a/.github/workflows/node-zero.yml +++ b/.github/workflows/node-zero.yml @@ -24,35 +24,11 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: dcodeIO/setup-node-nvm@master - name: Use Node.js ${{ matrix.node-version }} + - uses: ljharb/actions/node/run@main with: node-version: ${{ matrix.node-version }} - - name: Cache node modules - id: cache_node_modules - uses: actions/cache@v1 - with: - path: node_modules - key: node_modules-${{ github.workflow }}-${{ github.action }}-${{ github.run_id }} - - if: steps.cache_node_modules.cache-hit != 'true' - name: 'upgrade npm, npm install' - run: | - . /home/runner/mynvm/nvm.sh - case "${{ matrix.node-version }}" in - 0.* ) export NPM_CONFIG_STRICT_SSL=false ;; - esac - nvm install-latest-npm - export CI_RESET_NODE_VERSION=1 - case "${{ matrix.node-version }}" in - 0.5|0.5.*|0.6|0.6.*|0.7|0.7.*|0.9|0.9.*) nvm install --latest-npm 0.8 ;; - 5.*|6.1|6.2 ) nvm install --latest-npm 6 ;; - 9.0|9.1|9.2 ) nvm install --latest-npm 9 ;; - * ) export CI_RESET_NODE_VERSION=0 ;; - esac - npm install - if [ "${CI_RESET_NODE_VERSION-}" = 1 ]; then nvm use "${{ matrix.node-version }}"; fi - - run: npm run tests-only - - run: if [ -f coverage/*.json ]; then bash <(curl -s https://codecov.io/bash) -f coverage/*.json; fi + command: 'tests-only' + cache-node-modules-key: node_modules-${{ github.workflow }}-${{ github.action }}-${{ github.run_id }} unstable: needs: [matrix, stable] name: 'unstable minors' @@ -65,33 +41,11 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: dcodeIO/setup-node-nvm@master - name: Use Node.js ${{ matrix.node-version }} + - uses: ljharb/actions/node/run@main with: node-version: ${{ matrix.node-version }} - - name: Cache node modules - id: cache_node_modules - uses: actions/cache@v1 - with: - path: node_modules - key: node_modules-${{ github.workflow }}-${{ github.action }}-${{ github.run_id }} - - if: steps.cache_node_modules.cache-hit != 'true' - name: 'upgrade npm, npm install' - run: | - . /home/runner/mynvm/nvm.sh - case "${{ matrix.node-version }}" in - 0.* ) export NPM_CONFIG_STRICT_SSL=false ;; - esac - nvm install-latest-npm - export CI_RESET_NODE_VERSION=1 - case "${{ matrix.node-version }}" in - 0.5|0.6|0.7|0.9) nvm install --latest-npm 0.8 ;; - * ) export CI_RESET_NODE_VERSION=0 ;; - esac - npm install - if [ "${CI_RESET_NODE_VERSION-}" = 1 ]; then nvm use "${{ matrix.node-version }}"; fi - - run: npm run tests-only - - run: if [ -f coverage/*.json ]; then bash <(curl -s https://codecov.io/bash) -f coverage/*.json; fi + command: 'tests-only' + cache-node-modules-key: node_modules-${{ github.workflow }}-${{ github.action }}-${{ github.run_id }} node: name: 'node 0.x' diff --git a/.github/workflows/ses.yml b/.github/workflows/ses.yml index 2aa3011..8f76e4d 100644 --- a/.github/workflows/ses.yml +++ b/.github/workflows/ses.yml @@ -15,25 +15,11 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: dcodeIO/setup-node-nvm@master - name: Use Node.js ${{ matrix.node-version }} + - uses: ljharb/actions/node/run@main + name: 'npm install && npm run test:ses' with: node-version: ${{ matrix.node-version }} - - name: 'upgrade npm, npm install' - run: | - . /home/runner/mynvm/nvm.sh - nvm install-latest-npm - export CI_RESET_NODE_VERSION=1 - case "${{ matrix.node-version }}" in - 0.5|0.5.*|0.6|0.6.*|0.7|0.7.*|0.9|0.9.*) nvm install --latest-npm 0.8 ;; - 5.*|6.1|6.2 ) nvm install --latest-npm 6 ;; - 9.0|9.1|9.2 ) nvm install --latest-npm 9 ;; - * ) export CI_RESET_NODE_VERSION=0 ;; - esac - npm install - if [ "${CI_RESET_NODE_VERSION-}" = 1 ]; then nvm use "${{ matrix.node-version }}"; fi - - run: npm run test:ses - - run: if [ -f coverage/*.json ]; then bash <(curl -s https://codecov.io/bash) -f coverage/*.json; fi + command: 'test:ses' SES: needs: [tests]