Skip to content

chore(deps): update dependency django to v6 #13038

chore(deps): update dependency django to v6

chore(deps): update dependency django to v6 #13038

Workflow file for this run

name: Test
on: [push, pull_request]
jobs:
test:
services:
postgres:
image: postgres:18.1-alpine@sha256:b40d931bd0e7ce6eecc59a5a6ac3b3c04a01e559750e73e7086b6dbd7f8bf545
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: weblate
POSTGRES_DB: weblate
mariadb:
image: mariadb:10.11.15@sha256:8763a63f00ec980d913c04bf84f7fd5f60aa11ac9033f36d1a77921c065a5988
env:
MARIADB_ROOT_PASSWORD: weblate
MARIADB_DATABASE: weblate
ports:
- 3306:3306
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python-version:
- '3.11'
- '3.12'
- '3.13'
database:
- sqlite
- mariadb
- postgresql
name: Python ${{ matrix.python-version }}, ${{ matrix.database }}
env:
CI_DATABASE: ${{ matrix.database }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: true
fetch-depth: 0
- name: Install apt dependencies
# gettext is needed as Django uses msgfmt to compile MO files
run: |
sudo apt update
sudo apt install gettext
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: ${{ matrix.python-version }}
- uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6
with:
cache-suffix: test
version: 0.9.18
- name: Install pip dependencies
run: uv pip install --system -r requirements-dev.txt
- name: Compile MO files
run: ./scripts/generate-locales
- name: Collect static files
run: ./manage.py collectstatic
- name: Django checks
run: ./manage.py check
- name: Test with Django
run: |
pytest --junitxml=junit.xml weblate_web
cp .coverage .coverage.pytest
- name: Migrations
run: |
# First version with database backends tests
git checkout 7ba420b18ec3c7d32fb71823335e068f15b96855
./manage.py migrate
./manage.py shell -c 'customer = Customer.objects.create(user_id=-1); payment = Payment.objects.create(customer=customer, amount=1); Payment.objects.create(customer=customer, amount=1, repeat=payment)'
EXISTING_PK=$(./manage.py dumpdata payments.Payment | jq '.[].pk' | tr -d - | sort)
EXISTING_REPEAT=$(./manage.py dumpdata payments.Payment | jq '.[].fields.repeat' | tr -d - | sort)
git checkout "$GITHUB_SHA"
coverage run ./manage.py migrate
NEW_PK=$(./manage.py dumpdata payments.Payment | jq '.[].pk' | tr -d - | sort)
NEW_REPEAT=$(./manage.py dumpdata payments.Payment | jq '.[].fields.repeat' | tr -d - | sort)
if [ "$NEW_PK" != "$EXISTING_PK" ] ; then
echo "Migration failed (pk): $NEW_PK != $EXISTING_PK"
exit 1
fi
if [ "$NEW_REPEAT" != "$EXISTING_REPEAT" ] ; then
echo "Migration failed (repeat): $NEW_REPEAT != $EXISTING_REPEAT"
exit 1
fi
- name: Coverage
run: |
coverage combine
coverage xml
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
token: ${{secrets.CODECOV_TOKEN}}
flags: unittests
name: Python ${{ matrix.python-version }}
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
permissions:
contents: read