Skip to content
This repository has been archived by the owner on Oct 6, 2020. It is now read-only.

Try setting up a build matrix #17

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Try setting up a build matrix
  • Loading branch information
m-allanson committed Sep 1, 2018
commit ec9463710f73d7634f397cd33478d054b20b6927
92 changes: 23 additions & 69 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,81 +1,35 @@
services:
- docker

os:
- linux

dist: trusty
sudo: required

jobs:
include:
- stage: Unit tests
if: type = pull_request
language: node_js
node_js:
- '6'
- '8'
- '10'
cache:
yarn: true
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH
install:
- yarn run bootstrap
script:
- yarn test

- stage: Integration tests
if: type = pull_request
language: node_js
node_js:
- '6'
- '8'
- '10'
cache:
yarn: true
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH
install:
- yarn run bootstrap
script:
- yarn test:integration
language: node_js
node_js:
- '6'
- '8'
- '10'

- stage: Develop UI tests
language: node_js
node_js:
- '6'
- '8'
- '10'
cache:
yarn: true
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH
- cd examples/gatsbygram
install:
- yarn
script:
- yarn test
matrix:
include:
- name: "Unit Tests"
env: SRC_PATH=. INSTALL_COMMAND='run bootstrap' TEST_COMMAND=test
- name: "Integration Tests"
env: SRC_PATH=. INSTALL_COMMAND='run bootstrap' TEST_COMMAND='test:integration'
- name: "Develop UI Tests"
env: SRC_PATH='examples/gatsbygram' INSTALL_COMMAND='install' TEST_COMMAND=test
- name: "Production UI Tests"
env: SRC_PATH='integration-tests/production-runtime' INSTALL_COMMAND='install' TEST_COMMAND=test

- stage: Production UI tests
language: node_js
node_js:
- '6'
- '8'
- '10'
cache:
yarn: true
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH
- cd integration-tests/production-runtime
install:
- yarn
script:
- yarn test
cache:
yarn: true
before_install:
- 'cd $SRC_PATH'
install:
- 'yarn $INSTALL_COMMAND'
script:
- 'yarn $TEST_COMMAND'

# new pushes aren't working at the moment (the build times out processing showcase images)
# the existing image works fine, and can be manually updated by running through the steps
Expand Down