[Tests] partially migrate to Github Actions

Jordan Harband 2020-11-07 00:09:08 -08:00
parent 22902f04a3
commit 80a4e06af9
No known key found for this signature in database
GPG Key ID: 9F6A681E35EF8B56
5 changed files with 92 additions and 23 deletions

View File

@ -0,0 +1,50 @@
name: 'Tests: `nvm install-latest-npm`'
on: [pull_request, push]
jobs:
nodes:
name: 'nvm install-latest-npm'
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- "11"
- "10"
- "9"
- "9.2"
- "9.1"
- "9.0"
- "8"
- "7"
- "6"
- "6.1"
- "5"
- "5.9"
- "4"
- "4.6"
- "4.5"
- "4.4"
- "3"
- "2"
- "1"
- "0.12"
- "0.10"
steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/run@main
name: 'nvm install-latest-npm'
with:
node-version: ${{ matrix.node-version }}
skip-ls-check: true
skip-install: true
shell-command: 'npm --version'
node:
name: 'nvm install-latest-npm'
needs: [nodes]
runs-on: ubuntu-latest
steps:
- run: 'echo tests completed'

38
.github/workflows/lint.yml vendored 100644
View File

@ -0,0 +1,38 @@
name: 'Tests: linting'
on: [pull_request, push]
jobs:
eclint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/run@main
name: 'npm install && npm run eclint'
with:
node-version: 'lts/*'
command: 'eclint'
dockerfile_lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/run@main
name: 'npm install && npm run dockerfile_lint'
with:
node-version: 'lts/*'
command: 'dockerfile_lint'
doctoc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/run@main
name: 'npm install && npm run dockerfile_lint'
with:
node-version: 'lts/*'
shell-command: |
set -e
cp README.md README.md.orig
npm run doctoc
diff -q README.md README.md.orig

View File

@ -1,4 +1,4 @@
name: "Tests: release process" name: 'Tests: release process'
on: [pull_request, push] on: [pull_request, push]

View File

@ -1,4 +1,4 @@
name: "Tests: shellcheck" name: 'Tests: shellcheck'
on: [pull_request, push] on: [pull_request, push]

View File

@ -22,13 +22,9 @@ install:
- if [ -z "${SHELLCHECK-}" ]; then nvm install node && npm install && npm prune && npm ls urchin doctoc eclint dockerfile_lint; fi - if [ -z "${SHELLCHECK-}" ]; then nvm install node && npm install && npm prune && npm ls urchin doctoc eclint dockerfile_lint; fi
- '[ -z "$WITHOUT_CURL" ] || sudo apt-get remove curl -y' - '[ -z "$WITHOUT_CURL" ] || sudo apt-get remove curl -y'
script: script:
- if [ -n "${DOCTOCCHECK-}" ]; then cp README.md README.md.orig && npm run doctoc && diff -q README.md README.md.orig ; fi
- if [ -n "${ECLINT-}" ]; then npm run eclint ; fi
- if [ -n "${DOCKERFILE_LINT-}" ]; then npm run dockerfile_lint ; fi
- if [ -n "${SHELL-}" ] && [ -n "${TEST_SUITE}" ]; then if [ "${TEST_SUITE}" = 'installation_iojs' ]; then travis_retry make TEST_SUITE=$TEST_SUITE URCHIN="$(npm bin)/urchin" test-$SHELL ; else make TEST_SUITE=$TEST_SUITE URCHIN="$(npm bin)/urchin" test-$SHELL; fi; fi - if [ -n "${SHELL-}" ] && [ -n "${TEST_SUITE}" ]; then if [ "${TEST_SUITE}" = 'installation_iojs' ]; then travis_retry make TEST_SUITE=$TEST_SUITE URCHIN="$(npm bin)/urchin" test-$SHELL ; else make TEST_SUITE=$TEST_SUITE URCHIN="$(npm bin)/urchin" test-$SHELL; fi; fi
before_cache: before_cache:
- if [ -n "$WITHOUT_CURL" ]; then sudo apt-get install curl -y ; fi - if [ -n "$WITHOUT_CURL" ]; then sudo apt-get install curl -y ; fi
- if [ -n "${NODE-}" ]; then . nvm.sh && set -ex && nvm install --latest-npm "${NODE}" && npm --version; fi
env: env:
global: global:
- CXX=g++ - CXX=g++
@ -37,9 +33,6 @@ env:
- PATH="/usr/lib/ccache/:$PATH" - PATH="/usr/lib/ccache/:$PATH"
- NVM_DIR="${TRAVIS_BUILD_DIR}" - NVM_DIR="${TRAVIS_BUILD_DIR}"
matrix: matrix:
- DOCTOCCHECK=true
- ECLINT=true
- DOCKERFILE_LINT=true
- SHELL=bash TEST_SUITE=install_script - SHELL=bash TEST_SUITE=install_script
- SHELL=sh TEST_SUITE=fast - SHELL=sh TEST_SUITE=fast
- SHELL=dash TEST_SUITE=fast - SHELL=dash TEST_SUITE=fast
@ -76,15 +69,3 @@ env:
- SHELL=zsh TEST_SUITE=installation_iojs WITHOUT_CURL=1 - SHELL=zsh TEST_SUITE=installation_iojs WITHOUT_CURL=1
# - SHELL=ksh TEST_SUITE=installation_iojs # - SHELL=ksh TEST_SUITE=installation_iojs
# - SHELL=ksh TEST_SUITE=installation_iojs WITHOUT_CURL=1 # - SHELL=ksh TEST_SUITE=installation_iojs WITHOUT_CURL=1
- NODE=10 TEST="nvm install-latest-npm"
- NODE=9 TEST="nvm install-latest-npm"
- NODE=8 TEST="nvm install-latest-npm"
- NODE=7 TEST="nvm install-latest-npm"
- NODE=6 TEST="nvm install-latest-npm"
- NODE=5 TEST="nvm install-latest-npm"
- NODE=5.9 TEST="nvm install-latest-npm"
- NODE=4 TEST="nvm install-latest-npm"
- NODE=4.6 TEST="nvm install-latest-npm"
- NODE=4.5 TEST="nvm install-latest-npm"
- NODE=4.4 TEST="nvm install-latest-npm"
- NODE=2 TEST="nvm install-latest-npm"