From 764fe6a7bab9a7f477f77d3f7a6efdb3bb2c882e Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 8 Aug 2024 05:26:00 +0200 Subject: [PATCH] ci: smol optimization to avoid installing unecessary pip dependencies? --- .gitlab/ci/test.gitlab-ci.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.gitlab/ci/test.gitlab-ci.yml b/.gitlab/ci/test.gitlab-ci.yml index bb1b8e3b6..1caa3646d 100644 --- a/.gitlab/ci/test.gitlab-ci.yml +++ b/.gitlab/ci/test.gitlab-ci.yml @@ -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