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" }}
237
3- # heavily inspired by https://raw.githubusercontent.com/pinax/pinax-wiki/6bd2a99ab6f702e300d708532a6d1d9aa638b9f8/.circleci/config.yml
438
539common : &common
640 working_directory : ~/repo
741 steps :
842 - 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
2646 - run :
2747 name : run tox
2848 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
3750
3851jobs :
3952 docs :
@@ -70,35 +83,14 @@ jobs:
7083 working_directory : ~/repo
7184 steps :
7285 - 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
9089 - run :
9190 name : run tox
9291 # Allow failures for django master tests
9392 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
10294 docker :
10395 - image : circleci/python:3.9
10496 environment :
@@ -111,8 +103,7 @@ jobs:
111103 TOXENV : lint
112104
113105workflows :
114- version : 2
115- test :
106+ workflow :
116107 jobs :
117108 - docs
118109 - python38-drf310
0 commit comments