ci: smol optimization to avoid installing unecessary pip dependencies?

This commit is contained in:
Alexandre Aubin 2024-08-08 05:26:00 +02:00
parent 200f0272d5
commit 764fe6a7ba

View file

@ -1,15 +1,12 @@
.install_debs: &install_debs
- apt-get update -o Acquire::Retries=3
- DEBIAN_FRONTEND=noninteractive SUDO_FORCE_REMOVE=yes apt --assume-yes -o Dpkg::Options::="--force-confold" --allow-downgrades install ${CI_PROJECT_DIR}/*.deb
- pip3 install -U mock pip pytest pytest-cov pytest-mock pytest-sugar requests-mock tox ansi2html black jinja2 "packaging<22"
.test-stage:
stage: test
image: "core-tests"
variables:
PYTEST_ADDOPTS: "--color=yes"
before_script:
- *install_debs
- apt-get update -o Acquire::Retries=3
- DEBIAN_FRONTEND=noninteractive SUDO_FORCE_REMOVE=yes apt --assume-yes -o Dpkg::Options::="--force-confold" --allow-downgrades install ${CI_PROJECT_DIR}/*.deb
- pip3 install -U mock pytest pytest-cov pytest-mock pytest-sugar requests-mock "packaging<22"
cache:
paths:
- src/tests/apps
@ -33,7 +30,8 @@ full-tests:
variables:
PYTEST_ADDOPTS: "--color=yes"
before_script:
- *install_debs
- apt-get update -o Acquire::Retries=3
- DEBIAN_FRONTEND=noninteractive SUDO_FORCE_REMOVE=yes apt --assume-yes -o Dpkg::Options::="--force-confold" --allow-downgrades install ${CI_PROJECT_DIR}/*.deb
- yunohost tools postinstall -d domain.tld -u syssa -F 'Syssa Mine' -p the_password --ignore-dyndns --force-diskspace
script:
- python3 -m pytest --cov=yunohost tests/ src/tests/ --junitxml=report.xml