From bc5ffa2f920b790488110de19b089b249abe66ca Mon Sep 17 00:00:00 2001 From: Bastien Le Querrec <blq@laquadrature.net> Date: Sun, 17 Mar 2024 12:53:20 +0100 Subject: [PATCH] ci: ajout de pref13 --- .gitlab-ci.yml | 26 ++++++++++++++++++++++++++ Dockerfile-base | 5 +++-- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6a013f6..bc1136a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -63,3 +63,29 @@ test_ppparis: - data/ppparis/*.txt - output.log expire_in: 12 hours + +test_pref13: + stage: test + image: ${IMAGE_NAME}:latest + needs: [install] + script: + - curl --silent --location --output artifacts.zip "${CI_SERVER_PROTOCOL}://${CI_SERVER_HOST}:${CI_SERVER_PORT}/api/v4/projects/${CI_PROJECT_ID}/jobs/artifacts/${CI_COMMIT_BRANCH}/download?job=${CI_JOB_NAME}&job_token=${CI_JOB_TOKEN}" || true + - unzip -q artifacts.zip data/pref13/* || true + - rm artifacts.zip || true + - source bin/activate + - /etc/init.d/tor start + - python ./pref13.py + retry: 2 + only: + - main + cache: + key: $CI_COMMIT_REF_SLUG + paths: + - bin/ + - lib/ + - pyvenv.cfg + artifacts: + paths: + - data/pref13/*.txt + - output.log + expire_in: 12 hours diff --git a/Dockerfile-base b/Dockerfile-base index 95efbb9..3ef580d 100644 --- a/Dockerfile-base +++ b/Dockerfile-base @@ -4,7 +4,8 @@ ENV DEBIAN_FRONTEND="noninteractive" RUN apt-get update && \ apt-get dist-upgrade -y && \ - apt-get install --no-install-recommends -y python3 python3-virtualenv chromium-driver make xauth xvfb tesseract-ocr tesseract-ocr-eng tesseract-ocr-fra ocrmypdf curl unzip && \ + apt-get install --no-install-recommends -y python3 python3-virtualenv chromium-driver make xauth xvfb tesseract-ocr tesseract-ocr-eng tesseract-ocr-fra ocrmypdf curl unzip tor && \ apt-get clean && \ rm -rf /var/lib/apt/lists && \ - ln -s /usr/bin/python3 /usr/bin/python + ln -s /usr/bin/python3 /usr/bin/python && \ + sed -i '/^#ControlPort 9051/s/^#//' /etc/tor/torrc -- GitLab