odoo-openupgrade-wizard/.gitlab-ci.yml

70 lines
1.2 KiB
YAML

---
image: python3.6
cache:
key: one-key-to-rule-them-all
paths:
- .venv
stages:
- prepare
- linting
- tests
install_tools:
stage: prepare
script:
- python -m venv .venv
- source .venv/bin/activate
- pip install poetry
- poetry --version
- poetry install -v
- echo $PATH
- echo $PYTHONPATH
black:
stage: linting
script:
# Intall pipx to install black
# otherwise, it fails.
# TODO, check with Coop It Easy
- pip install --user pipx
- python -m pipx ensurepath
- source ~/.profile
# Classic CI
- pipx install black
- black --version
- black --check .
pylint:
stage: linting
script:
- source .venv/bin/activate
- pylint --version
pytest:
stage: tests
image: python
cache: {}
script:
# Install python3.6, because it is required to
# run virtualenv of odoo 14.0
- apt-get install python3.6
# Classic CI
- pip install poetry
- poetry --version
- poetry install -v
- poetry run pytest --version
- poetry run pytest --cov odoo_openupgrade_wizard -v
tox:
stage: tests
image: themattrix/tox
cache: {}
script:
- pip install poetry tox
- tox --version
- poetry --version
- tox