2018-02-02 01:42:48 +08:00
|
|
|
version: 2.0
|
|
|
|
|
|
|
|
# heavily inspired by https://raw.githubusercontent.com/pinax/pinax-wiki/6bd2a99ab6f702e300d708532a6d1d9aa638b9f8/.circleci/config.yml
|
|
|
|
|
|
|
|
common: &common
|
|
|
|
working_directory: ~/repo
|
|
|
|
steps:
|
|
|
|
- checkout
|
2018-05-16 02:52:40 +08:00
|
|
|
- run:
|
|
|
|
name: merge pull request base
|
|
|
|
command: ./.circleci/merge_pr.sh
|
|
|
|
- run:
|
|
|
|
name: merge pull request base (2nd try)
|
|
|
|
command: ./.circleci/merge_pr.sh
|
|
|
|
when: on_fail
|
|
|
|
- run:
|
|
|
|
name: merge pull request base (3nd try)
|
|
|
|
command: ./.circleci/merge_pr.sh
|
|
|
|
when: on_fail
|
2018-02-02 01:42:48 +08:00
|
|
|
- restore_cache:
|
|
|
|
keys:
|
|
|
|
- cache-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
|
|
|
|
- run:
|
|
|
|
name: install dependencies
|
|
|
|
command: pip install --user tox
|
|
|
|
- run:
|
|
|
|
name: run tox
|
2018-03-01 06:20:39 +08:00
|
|
|
command: ~/.local/bin/tox -r
|
2018-02-02 01:42:48 +08:00
|
|
|
- save_cache:
|
|
|
|
paths:
|
2018-05-16 02:52:40 +08:00
|
|
|
- .hypothesis
|
2018-02-02 01:42:48 +08:00
|
|
|
- .tox
|
|
|
|
- ~/.cache/pip
|
|
|
|
- ~/.local
|
|
|
|
- ./eggs
|
|
|
|
key: cache-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
|
|
|
|
|
|
|
|
jobs:
|
2019-07-29 18:51:01 +08:00
|
|
|
docs:
|
2018-02-08 06:37:30 +08:00
|
|
|
<<: *common
|
|
|
|
docker:
|
2019-01-16 08:06:18 +08:00
|
|
|
- image: circleci/python:3.6
|
2018-02-08 06:37:30 +08:00
|
|
|
environment:
|
2019-07-29 18:51:01 +08:00
|
|
|
TOXENV: docs
|
2018-02-02 01:42:48 +08:00
|
|
|
lint:
|
|
|
|
<<: *common
|
|
|
|
docker:
|
2019-01-16 08:06:18 +08:00
|
|
|
- image: circleci/python:3.6
|
2018-02-02 01:42:48 +08:00
|
|
|
environment:
|
|
|
|
TOXENV: lint
|
2019-12-03 08:01:06 +08:00
|
|
|
py36-test:
|
2018-02-02 01:42:48 +08:00
|
|
|
<<: *common
|
|
|
|
docker:
|
|
|
|
- image: circleci/python:3.6
|
|
|
|
environment:
|
2019-12-03 08:01:06 +08:00
|
|
|
TOXENV: py36-test
|
|
|
|
py37-test:
|
2019-01-16 08:06:18 +08:00
|
|
|
<<: *common
|
|
|
|
docker:
|
|
|
|
- image: circleci/python:3.7
|
|
|
|
environment:
|
2019-12-03 08:01:06 +08:00
|
|
|
TOXENV: py37-test
|
|
|
|
|
2018-02-02 01:42:48 +08:00
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
test:
|
|
|
|
jobs:
|
2019-07-29 18:51:01 +08:00
|
|
|
- docs
|
2018-02-02 01:42:48 +08:00
|
|
|
- lint
|
2019-12-03 08:01:06 +08:00
|
|
|
- py36-test
|
|
|
|
- py37-test
|