forked from GSA/data.gov
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yml
95 lines (91 loc) · 2.43 KB
/
config.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
version: 2
jobs:
lint:
docker:
- image: circleci/python:3.6
environment:
PIPENV_VENV_IN_PROJECT: 1
steps:
- checkout
- restore_cache:
keys:
- v6-pipenv-{{ checksum "Pipfile.lock" }}
- v6-pipenv-
- run: pipenv sync --dev
- run: pipenv run make vendor
- run: pipenv run make lint
# Snapshots the dependencies. Snyk will send notifications if any new
# vulnerabilities appear for this snapshot. This should only be run on
# `master`, since it represents the state of shipped dependencies.
snyk-monitor:
docker:
- image: circleci/python:3.6-node
steps:
- checkout
- restore_cache:
keys:
- v6-pipenv-{{ checksum "Pipfile.lock" }}
- v6-pipenv-
- run: pipenv sync --dev
- run:
name: install snyk
command: sudo npm install -g snyk
- run: snyk monitor --project-name=GSA/datagov-deploy --org=data.gov
snyk-test:
docker:
- image: circleci/python:3.6-node
steps:
- checkout
- restore_cache:
keys:
- v6-pipenv-{{ checksum "Pipfile.lock" }}
- v6-pipenv-
- run: pipenv sync --dev
- run:
name: install snyk
command: sudo npm install -g snyk
- run: snyk test --dev --project-name=GSA/datagov-deploy --org=data.gov
test:
docker:
- image: circleci/python:3.6
parallelism: 5
environment:
PIPENV_VENV_IN_PROJECT: 1
steps:
- checkout
- setup_remote_docker
# Restore cache and install python dependencies
- restore_cache:
keys:
- v6-pipenv-{{ checksum "Pipfile.lock" }}
- v6-pipenv-
- run:
name: install python dependencies
command: |
pipenv clean
pipenv sync --dev
- run:
name: Setup ansible-galaxy
command: pipenv run make vendor
- save_cache:
key: v6-pipenv-{{ checksum "Pipfile.lock" }}
paths:
- .venv
- ansible/roles/vendor
- run:
name: Run tests
command: |
TEST_TARGETS=$(make circleci-glob | circleci tests split)
pipenv run make ${TEST_TARGETS}
workflows:
version: 2
commit:
jobs:
- lint
- snyk-test
- test
- snyk-monitor:
filters:
branches:
only:
- master