4242 run : |
4343 echo "PYTHON_GIL=0" >> "$GITHUB_ENV"
4444
45- - name : Install Linux dependencies
46- if : startsWith(matrix.os, 'ubuntu')
47- run : |
48- sudo apt install gettext
49-
50- - name : Install macOS dependencies
51- if : startsWith(matrix.os, 'macos')
52- run : |
53- brew install gettext
54-
5545 - name : Install uv
5646 uses : astral-sh/setup-uv@v10.3.2
5747
58- - name : Generate translation binaries
59- run : |
60- scripts/generate-translation-binaries.sh
61-
6248 - name : Tox tests
6349 run : |
6450 uvx --python ${{ matrix.python-version }} --with tox-uv tox -e py
@@ -69,13 +55,40 @@ jobs:
6955 flags : ${{ matrix.os }}
7056 name : ${{ matrix.os }} Python ${{ matrix.python-version }}
7157
58+ translations :
59+ name : Translation catalogs up to date
60+ runs-on : ubuntu-latest
61+ steps :
62+ - uses : actions/checkout@v7.0.1
63+ with :
64+ persist-credentials : false
65+
66+ - name : Install gettext
67+ run : |
68+ sudo apt install gettext
69+
70+ - name : Update translations
71+ run : |
72+ scripts/update-translations.sh
73+
74+ - name : Check catalogs are up to date
75+ run : |
76+ if ! git diff --exit-code -I '^"POT-Creation-Date: ' -- src/humanize/locale; then
77+ echo "::error::Translation catalogs are out of date." \
78+ "Run scripts/update-translations.sh and commit the .po changes."
79+ exit 1
80+ fi
81+
7282 success :
7383 if : always()
74- needs : test
84+ needs : [ test, translations]
7585 runs-on : ubuntu-latest
7686 name : Test successful
7787 steps :
7888 - name : Success
7989 env :
8090 TEST_RESULT : ${{ needs.test.result }}
81- run : test "$TEST_RESULT" = "success"
91+ TRANSLATIONS_RESULT : ${{ needs.translations.result }}
92+ run : |
93+ test "$TEST_RESULT" = "success"
94+ test "$TRANSLATIONS_RESULT" = "success"
0 commit comments