odoo-openupgrade-wizard/.gitlab-ci.yml
Sylvain LE GAL 0aa9f8bf36 try
2022-05-30 13:51:00 +02:00

53 lines
1.4 KiB
YAML

image: docker:latest
services:
- docker: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:
# Install the latest pythhon version supported by this librairy
- apk add python3==~3.9 python3-dev==~3.9
- 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
tests/cli_02_get_code_test.py
tests/cli_03_docker_build_test.py
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