forked from sympy/sympy-live
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
50 lines (43 loc) · 1.23 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
48
49
50
language: python
python:
- '2.7'
services:
- docker
# Do nothing
before_install:
- ls
install:
- ls
before_script:
- docker-compose up -d
script:
- sleep 2 # Wait for api to be up
- docker-compose exec app pytest tests/ -v
before_deploy:
- docker cp app:/usr/src/app/lib lib
- openssl aes-256-cbc -K $encrypted_2fd045226a67_key -iv $encrypted_2fd045226a67_iv
-in client-secret.json.enc -out ../client-secret.json -d
- version=$(if [ ! -z "$TRAVIS_TAG" ]; then echo $(cut -d'-' -f2 <<<"$TRAVIS_TAG");
else echo "$TRAVIS_BRANCH"; fi)
- echo "Version = $version"
deploy:
provider: gae
keyfile: "../client-secret.json"
project: sympy-live-hrd
skip_cleanup: true
no_promote: true
version: "$version"
on:
all_branches: true
repo: sympy/sympy-live
after_deploy:
- pip install requests
- python bin/update_status_on_pr.py
- status_code=$(curl --write-out %{http_code} --silent --output /dev/null https://$version-dot-sympy-live-hrd.appspot.com/status)
- echo "App status code => $status_code"
- if [ "$status_code" != "200" ]; then travis_terminate; fi
- docker-compose down
env:
global:
# Do not prompt for user input when using any SDK methods.
- CLOUDSDK_CORE_DISABLE_PROMPTS=1