44 lines
901 B
YAML
44 lines
901 B
YAML
image: docker:18.09
|
|
|
|
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 -v odoo-data:/var/lib/odoo -d -p 8069:8069 --name odoo --link db:db -t odoo
|
|
|
|
- poetry run pytest --cov odoo_openupgrade_wizard -v
|