From 0fc4a978131ab68cace9c9a57cee245b6b70e595 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Mon, 18 Nov 2019 13:30:26 +0100 Subject: [PATCH] use Github Actions (#42) * ci: add Github Actions * ci: remove travis * ci: expand matrix * ci: fix versions * ci: fixes for old node.js versions * ci: use nvm on non-windows * ci: nvm differently * ci: load nvm * ci: set-env --- .github/workflows/nodejs.yml | 35 +++++++++++++++++++++++++++++++++++ .travis.yml | 27 --------------------------- 2 files changed, 35 insertions(+), 27 deletions(-) create mode 100644 .github/workflows/nodejs.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml new file mode 100644 index 0000000..fbbf5f4 --- /dev/null +++ b/.github/workflows/nodejs.yml @@ -0,0 +1,35 @@ +name: Node CI + +on: [push, pull_request] + +jobs: + test: + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + node-version: ['0.8', '0.10', '0.12', '4.x', '6.x', '8.x', '10.x', '12.x'] + exclude: + - os: windows-latest + node-version: '0.8' + + runs-on: ${{matrix.os}} + + steps: + - uses: actions/checkout@v1 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: Disable strict SSL checks + uses: allenevans/set-env@v1.0.0 + with: + NPM_CONFIG_STRICT_SSL: 'false' + if: matrix.node-version == '0.8' + - name: Upgrade npm to latest available version + run: | + curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash + source $HOME/.nvm/nvm.sh + nvm install-latest-npm + if: matrix.os != 'windows-latest' + - run: npm install + - run: npm test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 72a6882..0000000 --- a/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ -language: node_js -os: - - linux - - osx - - windows -node_js: - - "0.8" - - "0.10" - - "0.12" - - "iojs" - - "4" - - "5" - - "6" - - "7" - - "8" - - "9" - - "10" - - "11" - - "12" -matrix: - exclude: - - os: windows - node_js: "0.8" - - os: windows - node_js: "iojs" -before_install: - - 'if [ $TRAVIS_NODE_VERSION == 0.8 ]; then nvm install-latest-npm; fi'