odoo-openupgrade-wizard/.gitlab-ci.yml
Sylvain LE GAL ffa406ef20 WIp
2022-05-05 13:08:46 +02:00

49 lines
1.0 KiB
YAML

image: docker:18.09
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
services:
- docker:18.09-dind
stages:
- linting
- tests
black:
stage: linting
image: python
script:
# Install pipx
- pip install --user pipx
- python -m pipx ensurepath
- source ~/.profile
# Black Check
- pipx install black
- black --version
- black --check .
pytest:
stage: tests
script:
- apk add python3 python3-dev
- apk add gcc g++ libffi-dev
- apk add git
- python3 -m venv /.gitlab-ci-venv
- source /.gitlab-ci-venv/bin/activate
- pip install --upgrade pip
- pip install poetry
- poetry --version
- poetry install -v
- echo $PATH
- echo $PYTHONPATH
- poetry run pytest --version
# Create a postgresql container
- docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo -e POSTGRES_DB=postgres --publish 9542:5432 --name db postgres:13
- poetry run pytest --cov odoo_openupgrade_wizard -v\
tests/cli_A_init_test.py