Skip to content

Commit

Permalink
[Tests] migrate remaining tests to Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Nov 2, 2020
1 parent 8b9078a commit 4084cd9
Show file tree
Hide file tree
Showing 7 changed files with 418 additions and 185 deletions.
235 changes: 235 additions & 0 deletions .github/workflows/node-4+.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,235 @@
name: 'Tests: node.js'

on: [pull_request, push]

jobs:
latest:
name: 'latest minors'
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [
"15.0",
"14.15",
"13.14",
"12.19",
"11.15",
"10.23",
"9.11",
"8.17",
"7.10",
"6.17",
"5.12",
"4.9"
]

steps:
- uses: actions/checkout@v2
- uses: dcodeIO/setup-node-nvm@master
name: Use Node.js ${{ matrix.node-version }}
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
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
minors:
needs: latest
name: 'non-latest minors'
continue-on-error: true
if: ${{ !github.head_ref || !startsWith(github.head_ref, 'renovate') }}
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [
"14.14",
"14.13",
"14.12",
"14.11",
"14.10",
"14.9",
"14.8",
"14.7",
"14.6",
"14.5",
"14.4",
"14.3",
"14.2",
"14.1",
"14.0",
"13.13",
"13.12",
"13.11",
"13.10",
"13.9",
"13.8",
"13.7",
"13.6",
"13.5",
"13.4",
"13.3",
"13.2",
"13.1",
"13.0",
"12.18",
"12.17",
"12.16",
"12.15",
"12.14",
"12.13",
"12.12",
"12.11",
"12.10",
"12.9",
"12.8",
"12.7",
"12.6",
"12.5",
"12.4",
"12.3",
"12.2",
"12.1",
"12.0",
"11.14",
"11.13",
"11.12",
"11.11",
"11.10",
"11.9",
"11.8",
"11.7",
"11.6",
"11.5",
"11.4",
"11.3",
"11.2",
"11.1",
"11.0",
"10.22",
"10.21",
"10.20",
"10.19",
"10.18",
"10.17",
"10.16",
"10.15",
"10.14",
"10.13",
"10.12",
"10.11",
"10.10",
"10.9",
"10.8",
"10.7",
"10.6",
"10.5",
"10.4",
"10.3",
"10.2",
"10.1",
"10.0",
"9.10",
"9.9",
"9.8",
"9.7",
"9.6",
"9.5",
"9.4",
"9.3",
"9.2",
"9.1",
"9.0",
"8.16",
"8.15",
"8.14",
"8.13",
"8.12",
"8.11",
"8.10",
"8.9",
"8.8",
"8.7",
"8.6",
"8.5",
"8.4",
"8.3",
"8.2",
"8.1",
"8.0",
"7.9",
"7.8",
"7.7",
"7.6",
"7.5",
"7.4",
"7.3",
"7.2",
"7.1",
"7.0",
"6.16",
"6.15",
"6.14",
"6.13",
"6.12",
"6.11",
"6.10",
"6.9",
"6.8",
"6.7",
"6.6",
"6.5",
"6.4",
"6.3",
"6.2",
"6.1",
"6.0",
"5.11",
"5.10",
"5.9",
"5.8",
"5.7",
"5.6",
"5.5",
"5.4",
"5.3",
"5.2",
"5.1",
"5.0",
"4.8",
"4.7",
"4.6",
"4.5",
"4.4",
"4.3",
"4.2",
"4.1",
"4.0"
]

steps:
- uses: actions/checkout@v2
- uses: dcodeIO/setup-node-nvm@master
name: Use Node.js ${{ matrix.node-version }}
with:
node-version: ${{ matrix.node-version }}
- 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

node:
needs: [latest, minors]
steps:
- run: 'echo tests completed'
137 changes: 0 additions & 137 deletions .github/workflows/node-4-9.yml

This file was deleted.

Loading

0 comments on commit 4084cd9

Please sign in to comment.