Skip to content

Commit 35ec6a7

Browse files
committed
Add catalogues check to CI
1 parent 07bb202 commit 35ec6a7

1 file changed

Lines changed: 29 additions & 2 deletions

File tree

‎.github/workflows/test.yml‎

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,40 @@ jobs:
5555
flags: ${{ matrix.os }}
5656
name: ${{ matrix.os }} Python ${{ matrix.python-version }}
5757

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+
5882
success:
5983
if: always()
60-
needs: test
84+
needs: [test, translations]
6185
runs-on: ubuntu-latest
6286
name: Test successful
6387
steps:
6488
- name: Success
6589
env:
6690
TEST_RESULT: ${{ needs.test.result }}
67-
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

Comments
 (0)