eth-accounts-index/.gitlab-ci.yml

62 lines
1.6 KiB
YAML
Raw Permalink Normal View History

2022-02-20 20:47:16 +01:00
stages:
- test
- run-coverage
- slither-analyzer
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
paths:
- .cache/pip
- .venv/
before_script:
- python -V # Print out python version for debugging
- pip install virtualenv
- virtualenv venv
- source venv/bin/activate
test:
image: registry.gitlab.com/grassrootseconomics/cic-base-images/ci-solc-python:latest
script:
# install test dependencies
- cd python
- export PYTHONPATH=.
- pip install --extra-index-url https://pip.grassrootseconomics.net
--extra-index-url https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple
-r requirements.txt -r test_requirements.txt
# run tests
- bash run_tests.sh
run-coverage:
stage: test
image: registry.gitlab.com/grassrootseconomics/cic-base-images/ci-solc-python:latest
script:
- cd python
- export PYTHONPATH=.
- pip install --extra-index-url https://pip.grassrootseconomics.net
--extra-index-url https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple
-r requirements.txt -r test_requirements.txt
- pip install pytest pytest-cov
- coverage run -m pytest
- coverage html
- coverage report --fail-under=90
coverage: '/^TOTAL.+?(\d+\%)$/'
artifacts:
reports:
2022-06-14 06:32:03 +02:00
coverage_report:
coverage_format: cobertura
path: python/htmlcov/index.html
2022-02-20 20:47:16 +01:00
slither-analyzer:
image: registry.gitlab.com/grassrootseconomics/cic-base-images/ci-solc-python:latest
allow_failure: true
script:
- cd solidity
- slither AccountsIndex.sol
- slither AccountsIndex.sol --print human-summary