Update dependency gunicorn to v22 [SECURITY] #546
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: Linting and Testing | |
on: [push] | |
jobs: | |
codestyle: | |
name: Codestyle and translation checks | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.11' | |
- name: Install poetry | |
uses: abatilo/actions-poetry@v2 | |
- name: Install any new dependencies | |
run: poetry install | |
if: steps.cache.outputs.cache-hit != 'true' | |
- name: Check migrations | |
run: poetry run python website/manage.py makemigrations boards committees events members website --no-input --check --dry-run | |
- name: Check translations | |
shell: bash | |
run: | | |
# Install gettext | |
sudo apt-get install gettext | |
# Run makemessages for all app | |
cd website | |
for dir in $(find * -maxdepth 0 -type d); do (cd $dir && poetry run ../manage.py makemessages -all); done | |
cd .. | |
# Check for obsolete translations in .po files (starting with `#~`). | |
echo "Searching for obsolete translations." | |
grep --include="*.po" --files-with-matches --recursive "^#~" website && exit 1 || echo "No obsolete translations found." | |
# Check for untranslated strings in .po files | |
echo "Searching for untranslated strings." | |
empty_strings=$(sed '$a\\' website/**/locale/nl/LC_MESSAGES/django.po | tac | sed '/^$/N;/\nmsgstr ""$/,/^msgid/!d' | tac) | |
if [[ $empty_strings ]]; then echo $empty_strings && exit 1; else echo "No untranslated strings found."; fi | |
# Check for fuzzy translations in .po files | |
echo "Searching for fuzzy translations." | |
grep --include="*.po" --files-with-matches --recursive "#, fuzzy" website && exit 1 || echo "No fuzzy translations found." |