Commit 5d4193ac authored by Nicolas Chauvat's avatar Nicolas Chauvat
Browse files

ci: add tox and gitlab-ci

parent c4c694ac9579
Pipeline #90162 failed with stages
in 39 seconds
---
default:
image: python:3.7
include:
- project: "open-source/gitlab-ci-templates"
ref: "branch/default"
file:
- "templates/no-duplicated-ci-pipelines.yml"
- "templates/lint/black.yml"
- "templates/lint/check-manifest.yml"
- "templates/lint/flake8.yml"
- "templates/lint/mypy.yml"
- "templates/lint/safety.yml"
- "templates/lint/yamllint.yml"
- "templates/tests/py3.yml"
- "templates/create-release-on-heptapod.yml"
- "templates/upload-python-package-to-heptapod.yml"
stages:
- lint
- tests
- build
- release
- publish
......@@ -2,3 +2,5 @@
(^|/)\.hg($|/)
(^|/)\.hgtags($|/)
^log$
.tox/
.egg-info/
[tox]
envlist = py3,flake8,check-manifest,black
[testenv]
deps =
pytest
git+https://github.com/psycojoker/pytest-capture-deprecatedwarnings
commands =
{envpython} -m pytest {posargs:test}
[testenv:flake8]
basepython = python3
skip_install = true
deps =
flake8 >= 3.6
commands = {envpython} -m flake8 {toxinidir} {posargs}
[testenv:check-manifest]
skip_install = true
deps =
check-manifest
commands =
{envpython} -m check_manifest {toxinidir}
[testenv:yamllint]
skip_install = true
deps = yamllint
commands =
yamllint .
[testenv:safety]
deps =
safety
commands =
safety check
[testenv:mypy]
deps =
mypy >= 0.761
commands = mypy --ignore-missing-imports pybill
[testenv:black]
basepython = python3
skip_install = true
deps =
black >= 19.10b0
commands = black --check .
[testenv:black-run]
basepython = python3
skip_install = true
deps =
black >= 19.10b0
commands = black .
[testenv:pypi-publish]
basepython = python3
skip_install = true
whitelist_externals = rm
deps =
twine
passenv =
TWINE_USERNAME
TWINE_PASSWORD
commands =
rm -rf build dist .egg .egg-info
python3 setup.py sdist bdist_wheel
twine check dist/*
twine upload --skip-existing dist/*
[flake8]
basepython = python3
format = pylint
ignore = W503, E203, E731, E231, E501
max-line-length = 100
exclude = test/data/*,.tox/*,doc/*
[pytest]
python_files = *test_*.py
testpaths = test
addopts = -r fEs
Markdown is supported
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