-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcircle.yml
67 lines (63 loc) · 1.46 KB
/
circle.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
version: 2
aliases:
- &docker_image circleci/python:3.6.2-stretch
- &dependencies
name: Make virtualenv and install dependencies
command: |
python3 -m venv ~/venv
echo ". ~/venv/bin/activate" >> $BASH_ENV
source $BASH_ENV
make dependencies
jobs:
lint:
docker:
- image: *docker_image
steps:
- checkout
- run:
<<: *dependencies
- run: make validate
test:
docker:
- image: *docker_image
environment:
TEST_REPORTS: /tmp/test-reports
steps:
- checkout
- run:
name: Install postgres
command: |
sudo apt-get update && sudo apt install postgresql postgresql-contrib
- run:
<<: *dependencies
- run: make test_single_version
- store_test_results:
path: /tmp/test-reports
- store_artifacts:
path: /tmp/test-reports
deploy:
docker:
- image: *docker_image
steps:
- checkout
- run:
<<: *dependencies
- run: pip install -q -r deploy_requirements.txt
- add_ssh_keys:
fingerprints:
- "f9:ef:5e:40:d5:ed:e3:86:a1:18:3e:09:85:93:ef:3a" # CAN I DO THIS?? prob not
- run: python3 deploy.py prod
workflows:
version: 2
checks_and_deploy:
jobs:
- lint
- test
- deploy:
requires:
- lint
- test
filters:
branches:
only:
- master