forked from google-marketing-solutions/crmint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
44 lines (38 loc) · 1.35 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
# Use Dockerized infrastructure
sudo: false
language: python
python:
- "2.7"
# Cache our Gcloud SDK between commands
cache:
directories:
- "$HOME/google-cloud-sdk/"
services:
- mysql
env:
# Make sure gcloud command is on our PATH and the App Engine SDK is in the Python path
- GAE_PYTHONPATH=${HOME}/.cache/google_appengine PATH=${HOME}/google-cloud-sdk/bin:$PATH PYTHONPATH=${PYTHONPATH}:${GAE_PYTHONPATH} CLOUDSDK_CORE_DISABLE_PROMPTS=1
before_install:
# Install additional libraries
- sudo apt-get install -y realpath
# Download App Engine SDK
- if [ ! -d "${GAE_PYTHONPATH}" ]; then
python scripts/fetch_gae_sdk.py $(dirname "${GAE_PYTHONPATH}");
fi
# Install Google Cloud SDK
- rm -rf ${HOME}/google-cloud-sdk
- curl https://sdk.cloud.google.com | bash
- gcloud version || true
install:
# Update the App Engine environment
- gcloud -q components update
# Setup the CRMint project
- pip install -e cli/
- crmint dev init --no-insight
- crmint dev do requirements --no-insight
- pip install -r backends/tests/requirements.txt
- mysql -u root --execute="CREATE DATABASE IF NOT EXISTS crmintapp_test;"
- mysql -u root --execute="GRANT ALL PRIVILEGES ON crmintapp_test.* TO 'crmint'@'localhost' IDENTIFIED BY 'crmint'";
script:
# Run the unit tests
- cd backends && python runtests.py ${HOME}/google-cloud-sdk