Commit 93d5a714 authored by Viacheslav Sukhovieiev's avatar Viacheslav Sukhovieiev
Browse files

feat: ci implementation

parent 95c22494
Pipeline #22554 failed with stages
in 10 seconds
[flake8]
max-line-length = 120
ignore = D, VNE, E126, E123, E121, W504, W503
\ No newline at end of file
......@@ -81,6 +81,7 @@ htmlcov/
.tox/
.coverage
.coverage.*
cover-html
.cache
nosetests.xml
coverage.xml
......
include:
- project: 'prozorro-sale/ci-build-box'
file: '/template-ci.yml'
stages:
- lint
- build
- test
- publish
code-style-check:
extends: .lint-template
build-wheel:
extends: .build-wheel-template
test-unit-pytest:
stage: test
script:
- make test-unit-pytest
artifacts:
paths:
- .coverage
publish-wheel:
extends: .publish-wheel-template
publish-coverage-report:
extends: .publish-coverage-report-template
\ No newline at end of file
# Some simple testing tasks (sorry, UNIX only).
CI_COMMIT_REF_NAME ?= ''
cov:
@py.test --cov=aiohttp_swagger --cov-report=term --cov-report=html tests
ifeq ($(CI_COMMIT_REF_NAME), master)
EGG_INFO = egg_info --tag-date
else ifeq ($(shell echo ${CI_COMMIT_REF_NAME} | grep -o "^epic/"), epic/)
EGG_INFO = egg_info --tag-date --tag-build=DEV
else
EGG_INFO =
endif
clean:
@rm -rf `find . -name __pycache__`
......@@ -23,3 +29,24 @@ clean:
install:
@pip install -U pip
@pip install -Ur requirements-dev.txt
## Run pytest
test-unit-pytest:
@pip install -r requirements.txt -r requirements-dev.txt
@pytest -v \
-W ignore::DeprecationWarning \
--doctest-modules \
--cov=. \
-o testpaths="tests" \
## Build python package
build-wheel:
@python3 setup.py $(EGG_INFO) sdist bdist_wheel
## Publish python package
publish-wheel:
twine upload --skip-existing dist/*
## Publish coverage report
publish-coverage:
coverage report && coverage html -d cover-html
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment