diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6a013f61758ffc2f8821f612e7b4e7109fe3eb9e..bc1136a1bc037087e667d4efc91fede16285bdee 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 95efbb9b3da373b0f1e513dee2a6bb9057925078..3ef580d143f91e4b1dab43871d39c18e56609e2c 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