2020-05-07 05:27:50 +00:00
|
|
|
version: 2.1
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
docker:
|
|
|
|
- image: circleci/python:3.8
|
2020-05-07 06:18:43 +00:00
|
|
|
working_directory: ~/repo
|
2020-05-07 05:27:50 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- restore_cache:
|
2020-05-08 13:34:09 +00:00
|
|
|
key: deps1-{{ arch }}-{{ .Branch }}-{{ checksum "requirements.txt" }}-{{ checksum "requirements_test.txt" }}-{{ checksum "setup.py" }}
|
2020-05-07 05:27:50 +00:00
|
|
|
- run:
|
|
|
|
name: Install requirements
|
2020-05-08 13:34:09 +00:00
|
|
|
command: make build_test
|
2020-05-07 05:27:50 +00:00
|
|
|
- save_cache:
|
2020-05-08 13:34:09 +00:00
|
|
|
key: deps1-{{ arch }}-{{ .Branch }}-{{ checksum "requirements.txt" }}-{{ checksum "requirements_test.txt" }}-{{ checksum "setup.py" }}
|
2020-05-07 05:27:50 +00:00
|
|
|
paths:
|
2020-05-07 06:18:43 +00:00
|
|
|
- ./venv
|
|
|
|
pytest:
|
|
|
|
docker:
|
|
|
|
- image: circleci/python:3.8
|
|
|
|
working_directory: ~/repo
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- restore_cache:
|
2020-05-08 13:34:09 +00:00
|
|
|
key: deps1-{{ arch }}-{{ .Branch }}-{{ checksum "requirements.txt" }}-{{ checksum "requirements_test.txt" }}-{{ checksum "setup.py" }}
|
2020-05-07 05:27:50 +00:00
|
|
|
- run:
|
|
|
|
name: Run tests
|
2020-05-08 13:34:09 +00:00
|
|
|
command: make test
|
2020-05-07 05:27:50 +00:00
|
|
|
- store_artifacts:
|
|
|
|
path: test-reports/
|
|
|
|
destination: tr1
|
|
|
|
- store_test_results:
|
|
|
|
path: test-reports/
|
2020-05-07 06:18:43 +00:00
|
|
|
lint:
|
|
|
|
docker:
|
|
|
|
- image: circleci/python:3.8
|
|
|
|
working_directory: ~/repo
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- restore_cache:
|
2020-05-08 13:34:09 +00:00
|
|
|
key: deps1-{{ arch }}-{{ .Branch }}-{{ checksum "requirements.txt" }}-{{ checksum "requirements_test.txt" }}-{{ checksum "setup.py" }}
|
2020-05-07 06:18:43 +00:00
|
|
|
- run:
|
|
|
|
name: Run linter
|
2020-05-08 13:34:09 +00:00
|
|
|
command: make lint
|
2020-05-07 06:18:43 +00:00
|
|
|
|
|
|
|
workflows:
|
|
|
|
version: 2.1
|
|
|
|
all_test:
|
|
|
|
jobs:
|
|
|
|
- build
|
|
|
|
- pytest:
|
|
|
|
requires:
|
|
|
|
- build
|
|
|
|
- lint:
|
|
|
|
requires:
|
|
|
|
- build
|