use nvs for CI testing

This commit is contained in:
alexlamsl
2018-07-05 18:43:38 +08:00
parent 66c126ffde
commit b468103f26
2 changed files with 47 additions and 22 deletions

View File

@@ -1,14 +1,34 @@
language: node_js addons:
node_js: apt:
- "0.10" sources:
- "0.12" - ubuntu-toolchain-r-test
- "4" packages:
- "6" - libstdc++-4.9-dev
- "8" cache:
env: directories: tmp
- UGLIFYJS_TEST_ALL=1 language: generic
matrix: matrix:
fast_finish: true fast_finish: true
sudo: false sudo: false
cache: env:
directories: tmp global:
- UGLIFYJS_TEST_ALL=1
matrix:
- NODEJS_VER=node/0.10
- NODEJS_VER=node/0.12
- NODEJS_VER=node/4
- NODEJS_VER=node/6
- NODEJS_VER=node/8
- NODEJS_VER=node/latest
before_install:
- git clone --branch v1.4.2 --depth 1 https://github.com/jasongin/nvs.git ~/.nvs
- . ~/.nvs/nvs.sh
- nvs --version
install:
- nvs add $NODEJS_VER
- nvs use $NODEJS_VER
- node --version
- npm --version --no-update-notifier
- npm install --no-optional --no-save --no-update-notifier
script:
- npm test --no-update-notifier

View File

@@ -1,20 +1,25 @@
environment: environment:
UGLIFYJS_TEST_ALL: 1
matrix: matrix:
- nodejs_version: "0.10" - NODEJS_VER: node/0.10
- nodejs_version: "0.12" - NODEJS_VER: node/0.12
- nodejs_version: "4" - NODEJS_VER: node/4
- nodejs_version: "6" - NODEJS_VER: node/6
- nodejs_version: "8" - NODEJS_VER: node/8
- NODEJS_VER: node/latest
install: install:
- ps: Install-Product node $env:nodejs_version - git clone --branch v1.4.2 --depth 1 https://github.com/jasongin/nvs.git %LOCALAPPDATA%\nvs
- set UGLIFYJS_TEST_ALL=1 - set PATH=%LOCALAPPDATA%\nvs;%PATH%
- npm install - nvs --version
- nvs add %NODEJS_VER%
- nvs use %NODEJS_VER%
- node --version
- npm --version --no-update-notifier
- npm install --no-optional --no-save --no-update-notifier
build: off build: off
cache: cache:
- tmp - tmp
matrix: matrix:
fast_finish: true fast_finish: true
test_script: test_script:
- node --version - npm test --no-update-notifier
- npm --version
- npm test