2018-11-07 12:24:53 +01:00
|
|
|
language: node_js
|
|
|
|
node_js: node
|
|
|
|
|
|
|
|
# will run `npm install` automatically here
|
|
|
|
|
2019-03-11 13:39:53 +01:00
|
|
|
dist: xenial
|
|
|
|
|
|
|
|
# Deploying uses awscli and it uses Python.
|
|
|
|
# Xenial on Travis comes with Python 2 & 3 installed but 2 is default.
|
2019-03-11 14:14:43 +01:00
|
|
|
# Ensure pip3 is installed and upgraded.
|
2019-03-11 13:39:53 +01:00
|
|
|
before_install:
|
|
|
|
- sudo apt-get -qq update
|
|
|
|
- sudo apt-get install python3-pip
|
2019-03-11 14:14:43 +01:00
|
|
|
- sudo -H pip3 install --upgrade pip
|
2019-03-11 13:39:53 +01:00
|
|
|
|
2018-11-07 12:24:53 +01:00
|
|
|
script:
|
2018-11-10 00:31:47 +01:00
|
|
|
- npm test
|
2018-11-10 21:20:53 +01:00
|
|
|
- 'if [ "$TRAVIS_SECURE_ENV_VARS" = "true" ]; then npm run build; fi'
|
2018-11-07 12:24:53 +01:00
|
|
|
|
2019-03-11 14:28:49 +01:00
|
|
|
# Try to ensure Python 3 and pip3 get used for deployment.
|
|
|
|
# Note that "alias" commands do not work in .travis.yml
|
2018-11-16 11:12:28 +01:00
|
|
|
after_success:
|
2019-03-11 14:28:49 +01:00
|
|
|
- pyenv global 3.6
|
2019-03-11 14:14:43 +01:00
|
|
|
- pip3 install --user awscli
|
2018-11-16 11:19:43 +01:00
|
|
|
- export PATH=$PATH:$HOME/.local/bin
|
2018-11-16 11:12:28 +01:00
|
|
|
- npm run deploy
|
|
|
|
|
2018-11-07 12:24:53 +01:00
|
|
|
notifications:
|
2018-11-10 00:31:47 +01:00
|
|
|
email: false
|
2018-11-07 12:24:53 +01:00
|
|
|
|
|
|
|
cache:
|
2018-11-10 00:31:47 +01:00
|
|
|
directories:
|
|
|
|
- node_modules
|
|
|
|
- public
|