forked from gae-init/gae-init
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
47 lines (39 loc) · 1.79 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
language: python
python:
- '2.7.15'
cache:
pip: true
yarn: true
directories:
- '$HOME/google-cloud-sdk/'
- node_modules
notifications:
- email: false
env:
# Make sure gcloud command is on our PATH and *our* version is reached before any system version
- PATH=${HOME}/google-cloud-sdk/bin:$PATH CLOUDSDK_CORE_DISABLE_PROMPTS=1
before_install:
# Use cached version of gcloud if it exists
- if [ -f "$HOME/google-cloud-sdk/path.bash.inc" ]; then echo "Using cached gcloud"; source $HOME/google-cloud-sdk/path.bash.inc; else echo "Removing remnants"; rm -rf $HOME/google-cloud-sdk; fi
# Check if gcloud doesn't exist or if there is gcloud update, in which case delete the current installation
- if ! command -v gcloud || gcloud version 2>&1 | grep -F update; then echo "Removing remnants"; rm -rf $HOME/google-cloud-sdk; else echo "Keeping cached Google Cloud SDK"; fi
# Check if Google Cloud SDK is installed and if not remove remnants and install it
- if [ ! -d "$HOME/google-cloud-sdk/bin" ]; then "Installing fresh gcloud"; rm -rf $HOME/google-cloud-sdk; export CLOUDSDK_CORE_DISABLE_PROMPTS=1; curl https://sdk.cloud.google.com | bash; fi
# Add gcloud to $PATH or give some diagnostic info
- source $HOME/google-cloud-sdk/path.bash.inc || ls -al $HOME/google-cloud-sdk
- command -v gcloud
- gcloud version
- node -v
install:
- gcloud components install app-engine-python
- pip install -r requirements.txt
- pip install -r test-requirements.txt
# eslint requires node ^6.14.0 || ^8.10.0 || >=9.10.0 -- but doesn't actually need it.
# trusty (as used on travis) comes with 8.9.1
- yarn install --ignore-engines
before_script:
- yarn global add gulp-cli
script:
- yarn test
- gulp deploy --dryrun
- python main/runner.py --test-path tests ${HOME}/google-cloud-sdk/