1
- version : 2.0
1
+ version : 2.1
2
+
3
+ commands :
4
+ merge_pr_base :
5
+ steps :
6
+ - run :
7
+ name : merge pull request base
8
+ command : ./.circleci/merge_pr.sh
9
+ - run :
10
+ name : merge pull request base (2nd try)
11
+ command : ./.circleci/merge_pr.sh
12
+ when : on_fail
13
+ - run :
14
+ name : merge pull request base (3nd try)
15
+ command : ./.circleci/merge_pr.sh
16
+ when : on_fail
17
+ my_cache_restore :
18
+ steps :
19
+ - restore_cache :
20
+ keys :
21
+ - v7-cache-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
22
+ install_pip_deps :
23
+ steps :
24
+ - run :
25
+ name : install dependencies
26
+ command : pip install --user tox
27
+ my_cache_save :
28
+ steps :
29
+ - save_cache :
30
+ paths :
31
+ - .hypothesis
32
+ - .tox
33
+ - ~/.cache/pip
34
+ - ~/.local
35
+ - ./eggs
36
+ key : v7-cache-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
2
37
3
- # heavily inspired by https://raw.githubusercontent.com/pinax/pinax-wiki/6bd2a99ab6f702e300d708532a6d1d9aa638b9f8/.circleci/config.yml
4
38
5
39
common : &common
6
40
working_directory : ~/repo
7
41
steps :
8
42
- checkout
9
- - run :
10
- name : merge pull request base
11
- command : ./.circleci/merge_pr.sh
12
- - run :
13
- name : merge pull request base (2nd try)
14
- command : ./.circleci/merge_pr.sh
15
- when : on_fail
16
- - run :
17
- name : merge pull request base (3nd try)
18
- command : ./.circleci/merge_pr.sh
19
- when : on_fail
20
- - restore_cache :
21
- keys :
22
- - v7-cache-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
23
- - run :
24
- name : install dependencies
25
- command : pip install --user tox
43
+ - merge_pr_base
44
+ - my_cache_restore
45
+ - install_pip_deps
26
46
- run :
27
47
name : run tox
28
48
command : ~/.local/bin/tox -r
29
- - save_cache :
30
- paths :
31
- - .hypothesis
32
- - .tox
33
- - ~/.cache/pip
34
- - ~/.local
35
- - ./eggs
36
- key : v7-cache-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
49
+ - my_cache_save
37
50
38
51
jobs :
39
52
docs :
@@ -70,35 +83,14 @@ jobs:
70
83
working_directory : ~/repo
71
84
steps :
72
85
- checkout
73
- - run :
74
- name : merge pull request base
75
- command : ./.circleci/merge_pr.sh
76
- - run :
77
- name : merge pull request base (2nd try)
78
- command : ./.circleci/merge_pr.sh
79
- when : on_fail
80
- - run :
81
- name : merge pull request base (3nd try)
82
- command : ./.circleci/merge_pr.sh
83
- when : on_fail
84
- - restore_cache :
85
- keys :
86
- - v7-cache-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
87
- - run :
88
- name : install dependencies
89
- command : pip install --user tox
86
+ - merge_pr_base
87
+ - my_cache_restore
88
+ - install_pip_deps
90
89
- run :
91
90
name : run tox
92
91
# Allow failures for django master tests
93
92
command : ~/.local/bin/tox -r || true
94
- - save_cache :
95
- paths :
96
- - .hypothesis
97
- - .tox
98
- - ~/.cache/pip
99
- - ~/.local
100
- - ./eggs
101
- key : v7-cache-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
93
+ - my_cache_save
102
94
docker :
103
95
- image : circleci/python:3.9
104
96
environment :
@@ -111,8 +103,7 @@ jobs:
111
103
TOXENV : lint
112
104
113
105
workflows :
114
- version : 2
115
- test :
106
+ workflow :
116
107
jobs :
117
108
- docs
118
109
- python38-drf310
0 commit comments