Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
prozorro-sale
Aiohttp Swagger
Commits
93d5a714
Commit
93d5a714
authored
May 27, 2021
by
Viacheslav Sukhovieiev
Browse files
feat: ci implementation
parent
95c22494
Pipeline
#22554
failed with stages
in 10 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.flake8
0 → 100644
View file @
93d5a714
[flake8]
max-line-length = 120
ignore = D, VNE, E126, E123, E121, W504, W503
\ No newline at end of file
.gitignore
View file @
93d5a714
...
...
@@ -81,6 +81,7 @@ htmlcov/
.tox/
.coverage
.coverage.*
cover-html
.cache
nosetests.xml
coverage.xml
...
...
.gitlab-ci.yml
0 → 100644
View file @
93d5a714
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
Makefile
View file @
93d5a714
# 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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment