Commit 451da819 authored by François Ferry's avatar François Ferry
Browse files

ci: update tox.ini and add a gitlab-ci

parent 997532cf78c0
Pipeline #88811 failed with stages
in 1 minute and 57 seconds
---
default:
image: python:3.7
include:
- project: "open-source/gitlab-ci-templates"
ref: "branch/default"
file:
- "templates/no-duplicated-ci-pipelines.yml" # use workflow to avoid duplicated pipelines
- "templates/lint/flake8.yml" # will do the equivalent of 'tox -e flake8'
- "templates/lint/black.yml" # will do the equivalent of 'tox -e black'
- "templates/lint/check-manifest.yml" # will do the equivalent of 'tox -e check-manifest'
# - "templates/lint/yamllint.yml" # will do the equivalent of 'tox -e yamllint'
- "templates/tests/py3.yml" # will do the equivalent of 'tox -e py3'
- "templates/create-release-on-heptapod.yml" # this will create a release on heptapod
- "templates/upload-to-pypi.yml" # on a new mercurial tag (expected to be done with release-new), will push a release on pypi
# uncomment and uses to customize/extend the configuration here if needed
# (it needs to be at the same level than "- project")
# - ".gitlab-ci-extended.yml"
stages:
- lint
- tests
- release
- publish
[tox]
envlist = py27,py34,flake8
envlist = py3,flake8,black,check-manifest,yamllint
[testenv]
sitepackages = true
deps =
webtest
pytest
https://hg.logilab.org/review/cubicweb/archive/cd16d2458da9.tar.bz2#egg=cubicweb
git+https://github.com/psycojoker/pytest-capture-deprecatedwarnings
commands =
{envpython} -m pytest test {posargs}
{envpython} -m pytest {posargs:--verbose}
[pytest]
python_files = *test_*.py
testpaths = test
addopts = -r fEs
[testenv:flake8]
basepython = python3
skip_install = true
whitelist_externals =
flake8
deps =
flake8
commands = flake8
[flake8]
exclude = cubicweb_dataprocessing/migration/*,test/data/*,setup.py,.tox/*
exclude = cubicweb_dataprocessing/migration/*,.tox/*
format = pylint
ignore = W503, E203, E731, E231
max-line-length = 100
[pytest]
python_files = *test_*.py
[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:check-manifest]
skip_install = true
deps =
check-manifest
commands =
{envpython} -m check_manifest {toxinidir}
[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/*
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