Compare commits
1 commit
Author | SHA1 | Date | |
---|---|---|---|
4e2e227f58 |
2 changed files with 43 additions and 1 deletions
42
.gitlab-ci.yml
Normal file
42
.gitlab-ci.yml
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
image: python:latest
|
||||||
|
|
||||||
|
variables:
|
||||||
|
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
|
||||||
|
|
||||||
|
cache:
|
||||||
|
paths:
|
||||||
|
- .cache/pip
|
||||||
|
- venv/
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- python --version
|
||||||
|
- pip install virtualenv
|
||||||
|
- virtualenv venv
|
||||||
|
- source venv/bin/activate
|
||||||
|
|
||||||
|
black:
|
||||||
|
stage: test
|
||||||
|
script:
|
||||||
|
- pip install black
|
||||||
|
- make black
|
||||||
|
|
||||||
|
flake8:
|
||||||
|
stage: test
|
||||||
|
script:
|
||||||
|
- pip install flake8
|
||||||
|
- make flake8
|
||||||
|
|
||||||
|
pytest:
|
||||||
|
stage: test
|
||||||
|
script:
|
||||||
|
- pip install hypothesis pytest pytest-cov
|
||||||
|
- make check
|
||||||
|
coverage: '/TOTAL.*\s([.\d]+)%/'
|
||||||
|
artifacts:
|
||||||
|
when: always
|
||||||
|
reports:
|
||||||
|
junit: report.xml
|
||||||
|
coverage_report:
|
||||||
|
coverage_format: cobertura
|
||||||
|
path: coverage.xml
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -1,5 +1,5 @@
|
||||||
check:
|
check:
|
||||||
pytest -vvv --log-level debug --cov --cov-report=term-missing
|
pytest -vvv --log-level debug --cov --cov-report=term-missing --cov-report=xml:coverage.xml --junitxml=report.xml
|
||||||
|
|
||||||
lint: black flake8 mypy
|
lint: black flake8 mypy
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue