odoo-openupgrade-wizard/.gitlab-ci.yml
2022-05-30 13:39:44 +02:00

51 lines
1.5 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.9 python3.9-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