commit 644e6a96a6acf9ce0b9c7d8bd0f544585d0b4773 Author: emma peel emma.peel@riseup.net Date: Wed Sep 1 12:07:42 2021 +0200
first shot at https://gitlab.torproject.org/tpo/community/l10n/-/issues/40035, basically a copy from the working one at https://gitlab.torproject.org/tpo/web/manual/-/blob/master/.gitlab-ci.yml --- .gitlab-ci.yml | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..8cc9541 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,60 @@ +image: debian:buster-slim + +cache: + key: $CI_PROJECT_PATH_SLUG.${CI_COMMIT_REF_SLUG} + paths: + - packages + - lego + - apt-cache + +# This template should be usable on any system that's based on apt. +# taken from tor gitlabci + +.apt-template: &apt-template | + export LC_ALL=C.UTF-8 + echo Etc/UTC > /etc/timezone + mkdir -p apt-cache + export APT_CACHE_DIR="$(pwd)/apt-cache" + echo 'quiet "1";' \ + 'APT::Install-Recommends "0";' \ + 'APT::Install-Suggests "0";' \ + 'APT::Acquire::Retries "20";' \ + 'APT::Get::Assume-Yes "true";' \ + 'Dpkg::Use-Pty "0";' \ + "Dir::Cache::Archives "${APT_CACHE_DIR}"; " \ + >> /etc/apt/apt.conf.d/99gitlab + apt-get update -qq + apt-get upgrade -qy + +variables: + GIT_SUBMODULE_STRATEGY: recursive + +before_script: + - *apt-template + - DEBIAN_FRONTEND=noninteractive apt-get install gettext python3-babel python3-pip git python3-inifile python3-dev python3-setuptools python3-openssl python3-cryptography i18nspector -y + - pip3 install virtualenv + - virtualenv venv + - source venv/bin/activate + - pip3 install lektor + - echo 'checking out translations' + - rm -rf i18n + - git clone --branch communitytpo-contentspot https://git.torproject.org/translation.git i18n + - git clone https://gitlab.torproject.org/tpo/community/l10n.git + - pip3 install polib + +pages: + script: + - echo 'reinstalling plugins to have last version' + - lektor plugins reinstall + - echo 'building lektor 3 times to get translations in place' + - lektor build --output-path public && lektor build --output-path public && lektor build --output-path public + - echo 'lets see if there are any updates in the strings for translation' + - l10n/bin/check_po_status.py communitytpo-contentspot + artifacts: + paths: + - public + - i18n + +check_l10n: + script: + - l10n/bin/check_markdown_links.py i18n/
tor-commits@lists.torproject.org