From f93da7a58bef25723f9495cb07c1080bffbb224b Mon Sep 17 00:00:00 2001 From: Mark Lee Date: Wed, 26 Dec 2018 15:23:15 -0800 Subject: [PATCH] chore: run now with Node 8 in a separate Travis CI stage Does not work with Node 6 Also, upgrade bolt. --- .travis.yml | 35 ++++++++++++++++++++++------------- ci/docker.sh | 2 +- ci/docs.sh | 6 ++++++ ci/script.sh | 9 +-------- 4 files changed, 30 insertions(+), 22 deletions(-) create mode 100755 ci/docs.sh diff --git a/.travis.yml b/.travis.yml index ea05f070be..39659a3d62 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,28 +1,37 @@ language: node_js -node_js: -- '6' -os: -- linux -- osx -dist: trusty +node_js: '6' +dist: xenial osx_image: xcode8.3 -sudo: required cache: directories: - node_modules services: - docker -env: - matrix: - - NODE_INSTALLER=npm - - NODE_INSTALLER=yarn +jobs: + include: + - stage: test + os: linux + env: NODE_INSTALLER=npm + - os: linux + env: NODE_INSTALLER=yarn + - os: osx + env: NODE_INSTALLER=npm + - os: osx + env: NODE_INSTALLER=yarn + - stage: docs + os: linux + node_js: '8' + script: ci/docs.sh +stages: +- test +- name: docs + if: branch = master branches: only: - master - - v6 - /^v\d+\.\d+\.\d+/ install: -- npm i -g bolt@0.21.2 +- npm i -g bolt@0.22.5 script: ci/script.sh after_success: ci/coverage.sh notifications: diff --git a/ci/docker.sh b/ci/docker.sh index e26988067a..ceb3487eb1 100755 --- a/ci/docker.sh +++ b/ci/docker.sh @@ -5,7 +5,7 @@ set -e NODE_INSTALLER="$1" npm i -g yarn -npm i -g bolt@0.21.2 +npm i -g bolt@0.22.5 cd /code diff --git a/ci/docs.sh b/ci/docs.sh new file mode 100755 index 0000000000..85b95501a9 --- /dev/null +++ b/ci/docs.sh @@ -0,0 +1,6 @@ +#!/bin/bash -e + +yarn global add now +bolt +bolt build +yarn docs:deploy:ci diff --git a/ci/script.sh b/ci/script.sh index 8182a977a0..d92902bffd 100755 --- a/ci/script.sh +++ b/ci/script.sh @@ -1,6 +1,4 @@ -#!/bin/bash - -set -e +#!/bin/bash -e if [[ "$TRAVIS_OS_NAME" = "linux" ]]; then sudo docker run --privileged --interactive --tty --volume $(pwd):/code malept/electron-forge-container:latest /code/ci/docker.sh $NODE_INSTALLER @@ -9,9 +7,4 @@ else yarn build yarn lint yarn test - echo "$NODE_INSTALLER-$TRAVIS_SECURE_ENV_VARS-$TRAVIS_BRANCH" - if [[ "$NODE_INSTALLER-$TRAVIS_SECURE_ENV_VARS-$TRAVIS_BRANCH" = "yarn-true-master" ]]; then - npm i -g now - yarn docs:deploy:ci - fi fi