p5.js-web-editor/.travis.yml
Andrew Nicolaou 137ea783ea Experiment with "Checks" in Travis output (#1081)
* Run tests on CI

* Create a lint error on purpose

* Splits build into test and deploy stages

lint and test jobs will run in parallel and if both are successful
(and branch is master), deploy will run.

* Revert "Create a lint error on purpose"

This reverts commit 306c91c4278631fa1c1dcd40f0b23f7f9e5f000d.

* Updating snapshot

* Run deploy only on master branch (not PRs)

* Use global deploy config item to avoid building on PRs
2019-05-24 12:16:15 -04:00

44 lines
1 KiB
YAML

sudo: required
language: node_js
node_js:
- "10.15.0"
cache:
directories:
- "$HOME/google-cloud-sdk/"
services:
- docker
before_install:
- docker-compose -f docker-compose-development.yml up -d
- docker ps -a
install: true
jobs:
include:
- stage: test
name: "Linting"
script: docker-compose exec -T app npm run lint
- # stage name not required, will continue to use `test`
name: "Tests"
script: docker-compose exec -T app npm run test
before_deploy:
- docker-compose stop
- if [ ! -d "$HOME/google-cloud-sdk/bin" ]; then rm -rf $HOME/google-cloud-sdk; export CLOUDSDK_CORE_DISABLE_PROMPTS=1; curl https://sdk.cloud.google.com | bash >/dev/null; fi
- source /home/travis/google-cloud-sdk/path.bash.inc
- gcloud --quiet version
- gcloud --quiet components update
- gcloud --quiet components update kubectl
deploy:
- provider: script
script: ./deploy.sh
skip_cleanup: true
on:
branch: master
env:
global:
- APP_IMAGE_NAME=p5jswebeditor_app