Translations update from Hosted Weblate #464
Workflow file for this run
This file contains hidden or 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: Django CI | |
| on: [push, pull_request] | |
| jobs: | |
| non-selenium-tests: | |
| strategy: | |
| max-parallel: 4 | |
| matrix: | |
| python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] | |
| django-version: ['4.2.0', '5.1.0', '5.2.0', 'main'] | |
| exclude: | |
| - django-version: '4.2.0' | |
| python-version: '3.13' | |
| - django-version: '4.2.0' | |
| python-version: '3.14' | |
| - django-version: '5.1.0' | |
| python-version: '3.14' | |
| - django-version: 'main' | |
| python-version: '3.10' | |
| - django-version: 'main' | |
| python-version: '3.11' | |
| uses: ./.github/workflows/run_tests.yml | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| django-version: ${{ matrix.django-version }} | |
| translations: | |
| runs-on: ubuntu-latest | |
| name: Check translation inforamtion is up to date | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Install Python Dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt -r requirements-dev.txt | |
| - name: Install gettext | |
| run: | | |
| sudo apt-get -y install gettext | |
| - name: Check makemessages doesn't pick up significant changes | |
| run: | | |
| python ./manage.py makemessages --all --keep-pot | |
| # Output the diff for visual comparison | |
| # We filter the results to just changed or new/remove entries | |
| git diff | grep --color '^[+-]msg' || echo "No diff" | |
| # Asset that the filtered diff is empty | |
| COUNT=$(git diff wafer/locale/ | grep --color '^[+-]msg' | wc -l) | |
| if [ $COUNT -gt 0 ]; then | |
| echo "Non-empty diff for django.pot - Regenerate file" | |
| exit 1 | |
| fi | |
| - name: Compile Translations | |
| run: | | |
| # Check that the compile messages step doesn't fail due to bad formatting, etc. | |
| cd wafer | |
| python ../manage.py compilemessages | |
| selenium: | |
| runs-on: ubuntu-latest | |
| name: Selenium - Browser ${{ matrix.browser }} | |
| strategy: | |
| max-parallel: 2 | |
| matrix: | |
| browser: ['chrome', 'firefox'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Install Dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt -r requirements-dev.txt | |
| pip install selenium | |
| - name: Install node | |
| uses: actions/setup-node@v4 | |
| - name: Install javascript dependencies | |
| run: | | |
| npm install | |
| - name: Setup Chrome | |
| uses: browser-actions/setup-chrome@v1 | |
| if: matrix.browser == 'chrome' | |
| - name: Setup firefox | |
| run: | | |
| wget -O firefox.tar.bz2 'https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=en-US' | |
| tar xaf firefox.tar.bz2 | |
| export PATH=$PATH:${PWD}/firefox | |
| if: matrix.browser == 'firefox' | |
| - name: Run Tests | |
| run: | | |
| python manage.py test --tag ${{ matrix.browser }} | |
| build: | |
| runs-on: ubuntu-latest | |
| name: Build sdist and wheel | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Install Python Dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt -r requirements-dev.txt | |
| pip install build | |
| - name: Run build_release script | |
| run: | | |
| ./utils/build_release.sh | |
| - name: Run tests against the built wheel | |
| run: | | |
| # We want to create a isolate venv for this | |
| mkdir $RUNNER_TEMP/venv | |
| cp manage.py dist/*whl requirements-dev.txt $RUNNER_TEMP/venv | |
| cd $RUNNER_TEMP/venv | |
| python -m venv . | |
| . bin/activate | |
| pip install wafer*whl | |
| pip install -r requirements-dev.txt | |
| # Link to wafer module so test discovery works | |
| ln -s lib/python*/site-packages/wafer . | |
| ./manage.py test --exclude-tag selenium | |
| - name: Run diff between the tree and the sdist | |
| run: | | |
| mkdir $RUNNER_TEMP/sdist | |
| cp dist/*tar* $RUNNER_TEMP/sdist | |
| pushd $RUNNER_TEMP/sdist | |
| tar xaf wafer*tar* | |
| popd | |
| # Run diff, ignoring the stuff that not included and generated files | |
| # We also ignore setup.cfg, because the build process adds an egg-info | |
| # section to the version in the sdist | |
| diff -x .gitignore -x .git -x .github -x __pycache__ \ | |
| -x utils -x dist -x PKG-INFO \ | |
| -x .readthedocs.yml -x setup.cfg \ | |
| -ur . $RUNNER_TEMP/sdist/wafer*/ | |
| - name: Upload wheel | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheel | |
| path: dist/*whl | |
| - name: Upload sdist | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: sdist | |
| path: dist/*tar.gz |