mirror of
https://gitlab.com/pulsechaincom/staking-deposit-cli.git
synced 2025-01-09 12:31:21 +00:00
106 lines
2.9 KiB
YAML
106 lines
2.9 KiB
YAML
version: 2.1
|
|
|
|
tox_common: &tox_common
|
|
working_directory: ~/repo
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- venv-deps1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "requirements.txt" }}-{{ checksum "requirements_test.txt" }}-{{ checksum "setup.py" }}
|
|
- run:
|
|
name: install dependencies
|
|
command: pip install --user tox
|
|
- run:
|
|
name: run tox
|
|
command: ~/.local/bin/tox
|
|
- save_cache:
|
|
paths:
|
|
- .tox
|
|
- ./eggs
|
|
key: venv-deps1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "requirements.txt" }}-{{ checksum "requirements_test.txt" }}-{{ checksum "setup.py" }}
|
|
|
|
|
|
jobs:
|
|
venv_build:
|
|
docker:
|
|
- image: circleci/python:3.8
|
|
working_directory: ~/repo
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
key: venv-deps1-{{ arch }}-{{ .Branch }}-{{ checksum "requirements.txt" }}-{{ checksum "requirements_test.txt" }}-{{ checksum "setup.py" }}
|
|
- run:
|
|
name: Install requirements in venv
|
|
command: make venv_build_test
|
|
- save_cache:
|
|
key: venv-deps1-{{ arch }}-{{ .Branch }}-{{ checksum "requirements.txt" }}-{{ checksum "requirements_test.txt" }}-{{ checksum "setup.py" }}
|
|
paths:
|
|
- ./venv
|
|
venv_pytest:
|
|
docker:
|
|
- image: circleci/python:3.8
|
|
working_directory: ~/repo
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
key: venv-deps1-{{ arch }}-{{ .Branch }}-{{ checksum "requirements.txt" }}-{{ checksum "requirements_test.txt" }}-{{ checksum "setup.py" }}
|
|
- run:
|
|
name: Run tests with venv
|
|
command: make venv_test
|
|
- store_artifacts:
|
|
path: test-reports/
|
|
destination: tr1
|
|
- store_test_results:
|
|
path: test-reports/
|
|
venv_lint:
|
|
docker:
|
|
- image: circleci/python:3.8
|
|
working_directory: ~/repo
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
key: venv-deps1-{{ arch }}-{{ .Branch }}-{{ checksum "requirements.txt" }}-{{ checksum "requirements_test.txt" }}-{{ checksum "setup.py" }}
|
|
- run:
|
|
name: Run linter with venv
|
|
command: make venv_lint
|
|
tox-py37-core:
|
|
<<: *tox_common
|
|
docker:
|
|
- image: circleci/python:3.7
|
|
environment:
|
|
TOXENV: py37-core
|
|
tox-py38-core:
|
|
<<: *tox_common
|
|
docker:
|
|
- image: circleci/python:3.8
|
|
environment:
|
|
TOXENV: py38-core
|
|
tox-py37-script:
|
|
<<: *tox_common
|
|
docker:
|
|
- image: circleci/python:3.7
|
|
environment:
|
|
TOXENV: py37-script
|
|
tox-py38-script:
|
|
<<: *tox_common
|
|
docker:
|
|
- image: circleci/python:3.8
|
|
environment:
|
|
TOXENV: py38-script
|
|
|
|
workflows:
|
|
version: 2.1
|
|
all_test:
|
|
jobs:
|
|
- venv_build
|
|
- venv_pytest:
|
|
requires:
|
|
- venv_build
|
|
- venv_lint:
|
|
requires:
|
|
- venv_build
|
|
- tox-py37-core
|
|
- tox-py38-core
|
|
- tox-py37-script
|
|
- tox-py38-script
|