version: 2.1 jobs: build: docker: - image: circleci/python:3.8 working_directory: ~/repo steps: - checkout - restore_cache: key: deps1-{{ arch }}-{{ .Branch }}-{{ checksum "requirements.txt" }}-{{ checksum "requirements_test.txt" }}-{{ checksum "setup.py" }} - run: name: Install requirements command: make build_test - save_cache: key: deps1-{{ arch }}-{{ .Branch }}-{{ checksum "requirements.txt" }}-{{ checksum "requirements_test.txt" }}-{{ checksum "setup.py" }} paths: - ./venv pytest: docker: - image: circleci/python:3.8 working_directory: ~/repo steps: - checkout - restore_cache: key: deps1-{{ arch }}-{{ .Branch }}-{{ checksum "requirements.txt" }}-{{ checksum "requirements_test.txt" }}-{{ checksum "setup.py" }} - run: name: Run tests command: make test - store_artifacts: path: test-reports/ destination: tr1 - store_test_results: path: test-reports/ lint: docker: - image: circleci/python:3.8 working_directory: ~/repo steps: - checkout - restore_cache: key: deps1-{{ arch }}-{{ .Branch }}-{{ checksum "requirements.txt" }}-{{ checksum "requirements_test.txt" }}-{{ checksum "setup.py" }} - run: name: Run linter command: make lint workflows: version: 2.1 all_test: jobs: - build - pytest: requires: - build - lint: requires: - build