1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-19 21:30:10 +01:00

gitlab-ci: break out locale tests into job that fails on errors

This commit is contained in:
Hans-Christoph Steiner 2023-03-09 12:16:20 +01:00
parent 5a0453ca9d
commit 202ecc858c

View File

@ -195,13 +195,11 @@ lint_format_safety_bandit_checks:
ca-certificates ca-certificates
dash dash
gcc gcc
gettext
git git
make make
pycodestyle pycodestyle
pyflakes3 pyflakes3
pylint pylint
python3-babel
python3-dev python3-dev
python3-git python3-git
python3-nose python3-nose
@ -225,9 +223,25 @@ lint_format_safety_bandit_checks:
tests/*.py tests/*.py
tests/*.TestCase tests/*.TestCase
|| set_error || set_error
- exit $EXITVALUE
# Run all the various linters and static analysis tools.
locales:
image: debian:bookworm-slim
variables:
LANG: C.UTF-8
script:
- apt-get update
- apt-get -y install --no-install-recommends
gettext
make
python3-babel
- export EXITVALUE=0
- function set_error() { export EXITVALUE=1; printf "\x1b[31mERROR `history|tail -2|head -1|cut -b 6-500`\x1b[0m\n"; }
- make -C locale compile || set_error - make -C locale compile || set_error
- rm -f locale/*/*/*.mo - rm -f locale/*/*/*.mo
- pybabel compile --domain=fdroidserver --directory locale 2>&1 | (grep -F "error:" && exit 1) || true - pybabel compile --domain=fdroidserver --directory locale 2>&1 | { grep -F "error:" && exit 1; } || true
- exit $EXITVALUE - exit $EXITVALUE