From e414adecc96f9020357302af208acec89da8baa4 Mon Sep 17 00:00:00 2001 From: Eric Cornelissen Date: Mon, 27 Aug 2018 18:39:13 +0300 Subject: [PATCH] Update the travis build to work in stages (#948) * Update the travis build to work in stages * Intentional "Build website" error * Intentional "Lint" error * Restore CI test errors * Conditional deplay stage, only on master So PRs targetting develop don't run an empty stage. Related Travis Documentation: https://docs.travis-ci.com/user/conditional-builds-stages-jobs/ --- .travis.yml | 44 +++++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/.travis.yml b/.travis.yml index cf08e041..15268853 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,17 +1,25 @@ -matrix: +jobs: include: - - language: node_js - node_js: - - "8" - + - stage: "Test" + name: "Lint" + language: node_js + node_js: 8 script: - npm run jsonlint - npm run svglint + - name: "Build website" + language: ruby + rvm: 2.4.1 + install: + - gem install jekyll + script: + - jekyll build - notifications: - email: - on_success: never - on_failure: change + - stage: deploy + name: "NPM Package" + language: node_js + node_js: 8 + if: branch = master deploy: provider: npm @@ -20,17 +28,7 @@ matrix: on: branch: master - - language: ruby - rvm: - - 2.4.1 - - install: - - gem install jekyll - - script: - - jekyll build - - notifications: - email: - on_success: never - on_failure: change +notifications: + email: + on_success: never + on_failure: change