-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
48 lines (40 loc) · 1.11 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
language: python
sudo: required
python: 3.6
cache:
directories:
- /opt/terraform
pip: true
env:
global:
- TERRAFORM_VERSION=0.11.10
jobs:
include:
- stage: "Lint/Format/Validate/Test"
env: NEEDS_PYTHON_REQS="yes" NEEDS_TERRAFORM="yes"
after_success: skip
name: "Lint/Format/Validate"
script: ./deployment/scripts/lint_format_validate.sh
- script: nosetests
env: NEEDS_PYTHON_REQS="yes"
name: "Tests"
- stage: "Deploy"
env: NEEDS_TERRAFORM="yes"
after_success: skip
script: ./deployment/scripts/deploy.sh
install:
- |
if [ "${NEEDS_TERRAFORM}" = "yes" ]; then
if [ ! -f /opt/terraform/terraform ]; then
curl -fSL "https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip" -o terraform.zip;
sudo unzip terraform.zip -d /opt/terraform;
fi
sudo ln -s /opt/terraform/terraform /usr/bin/terraform;
rm -f terraform.zip;
fi
- |
if [ "${NEEDS_PYTHON_REQS}" = "yes" ]; then
pip install -r requirements-test.txt;
fi
after_success:
- codecov