Merge branch 'option_for_disable_comments' of https://github.com/Fher… #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: compilemessages | |
on: | |
push: | |
paths: | |
- 'locale/**' | |
pull_request: | |
paths: | |
- 'locale/**' | |
jobs: | |
compilemessages: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.7' | |
- name: Checkout submodules | |
run: | | |
git submodule init | |
git submodule update | |
- name: Install requirements | |
run: | | |
sudo apt-get install gettext | |
pip install -r requirements.txt | |
pip install pymysql | |
- name: Check .po file validity | |
run: | | |
fail=0 | |
while read -r file; do | |
if ! msgfmt --check-format "$file"; then | |
fail=$((fail + 1)) | |
fi | |
done < <(find locale -name '*.po') | |
exit "$fail" | |
shell: bash | |
- name: Compile messages | |
run: | | |
echo "STATIC_ROOT = '/tmp'" > dmoj/local_settings.py | |
python manage.py compilemessages |