Skip to content

Commit

Permalink
chore: run now with Node 8 in a separate Travis CI stage
Browse files Browse the repository at this point in the history
Does not work with Node 6

Also, upgrade bolt.
  • Loading branch information
malept committed Dec 27, 2018
1 parent 9125042 commit f93da7a
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 22 deletions.
35 changes: 22 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion ci/docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 6 additions & 0 deletions ci/docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash -e

yarn global add now
bolt
bolt build
yarn docs:deploy:ci
9 changes: 1 addition & 8 deletions ci/script.sh
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

0 comments on commit f93da7a

Please sign in to comment.