forked from Github-Mirrors/canaille
chore: Gitlab CI refactoring
This commit is contained in:
parent
1abf06fbe7
commit
9032e2b58e
1 changed files with 26 additions and 10 deletions
|
@ -9,44 +9,60 @@ stages:
|
|||
before_script:
|
||||
- apt update
|
||||
- env DEBIAN_FRONTEND=noninteractive apt install --yes python3-dev libldap2-dev libsasl2-dev libssl-dev slapd ldap-utils
|
||||
- curl -O https://bootstrap.pypa.io/get-pip.py
|
||||
- python get-pip.py
|
||||
- pip install --upgrade tox "poetry>1.3.0" coveralls pyyaml tomli
|
||||
- poetry config virtualenvs.in-project true
|
||||
|
||||
cache:
|
||||
paths:
|
||||
- .venv
|
||||
|
||||
style:
|
||||
image: python:3.11
|
||||
stage: test
|
||||
script: tox -e style
|
||||
script:
|
||||
- pip install pre-commit
|
||||
- pre-commit run --all-files --show-diff-on-failure
|
||||
|
||||
python38:
|
||||
image: python:3.8
|
||||
stage: test
|
||||
script: tox -e py38
|
||||
script:
|
||||
- poetry install
|
||||
- poetry run pytest
|
||||
|
||||
python39:
|
||||
image: python:3.9
|
||||
stage: test
|
||||
script: tox -e py39
|
||||
script:
|
||||
- poetry install
|
||||
- poetry run pytest
|
||||
|
||||
python310:
|
||||
image: python:3.10
|
||||
stage: test
|
||||
script: tox -e py310
|
||||
script:
|
||||
- poetry install
|
||||
- poetry run pytest
|
||||
|
||||
python311:
|
||||
image: python:3.11
|
||||
stage: test
|
||||
script: tox -e py311
|
||||
script:
|
||||
- poetry install
|
||||
- poetry run pytest
|
||||
|
||||
doc:
|
||||
image: python:3.11
|
||||
stage: test
|
||||
script: tox -e doc
|
||||
script:
|
||||
- poetry install --only doc
|
||||
- poetry run sphinx-build doc build/sphinx/html
|
||||
|
||||
coverage:
|
||||
image: python:3.11
|
||||
stage: test
|
||||
allow_failure: true
|
||||
script:
|
||||
- tox -e coverage
|
||||
- pip install coveralls pyyaml tomli
|
||||
- poetry install
|
||||
- poetry run pytest --cov --cov-fail-under=100 --cov-report term:skip-covered -n auto
|
||||
- coveralls
|
||||
|
|
Loading…
Reference in a new issue