odoo-openupgrade-wizard/.gitlab-ci.yml
Sylvain LE GAL 228835f2ab [TRY] Fix CI
2022-05-30 13:04:07 +02:00

57 lines
1.5 KiB
YAML

image: docker:latest
services:
- docker:dind
# variables:
# DOCKER_HOST: tcp://docker:2375
# DOCKER_TLS_CERTDIR: ""
before_script:
- docker info
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
- poetry run pytest --verbose --verbose tests/cli_01_init_test.py
- poetry run pytest --verbose --verbose tests/cli_02_get_code_test.py
- poetry run pytest --verbose --verbose tests/cli_03_docker_build_test.py
- poetry run pytest --verbose --verbose tests/cli_04_run_test.py
# Disabled : calling OdooRPC on mounted container
# in a container (gitlab) does'nt seems to work.
# - poetry run pytest --verbose --verbose tests/cli_05_execute_script_python_test.py
- poetry run pytest --verbose --verbose tests/cli_06_execute_script_sql_test.py
- poetry run pytest --verbose --verbose tests/cli_07_upgrade_test.py
- poetry run pytest --verbose --verbose tests/cli_08_generate_module_analysis_test.py