Skip to content

feat(api): Manage Project backups via API #50045

feat(api): Manage Project backups via API

feat(api): Manage Project backups via API #50045

Workflow file for this run

# Copyright © Michal Čihař <michal@weblate.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
name: Migrations
on:
push:
branches-ignore:
- renovate/**
- weblate
- dependabot/**
- copilot/**
- codex/**
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
jobs:
migrations:
runs-on: ubuntu-24.04
name: postgresql
env:
# This is needed for older versions to migrate, can be removed once migration from 5.17+ only is supported
CI_DATABASE: postgresql
CI_DB_PASSWORD: weblate
CI_DB_HOST: 127.0.0.1
CI_DB_PORT: '5432'
CI_SELENIUM: '1'
DJANGO_SETTINGS_MODULE: weblate.settings_test
UV_FROZEN: '1'
services:
database:
image: postgres:18.4-alpine@sha256:1b1689b20d16a014a3d195653381cf2caa75a41a92d93b255a9d6ea29fd353aa
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: weblate
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Install apt dependencies
run: sudo ./ci/apt-install
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
enable-cache: true
# Do not share cache with tests as this uses python 3.11 for older versions
cache-suffix: multi
save-cache: ${{ github.ref == 'refs/heads/main' }}
version: 0.11.21
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: |
3.11
3.13
- name: Install Python dependencies
run: ./ci/pip-install latest
- name: Check missing migrations
run: ./ci/run-checkmigrate
- name: Migrate from 5.10
run: ./ci/run-migrate 5.10
- name: Migrate from 5.11
run: ./ci/run-migrate 5.11
- name: Migrate from 5.12
run: ./ci/run-migrate 5.12
- name: Migrate from 5.13
run: ./ci/run-migrate 5.13
- name: Migrate from 5.14
run: ./ci/run-migrate 5.14
- name: Migrate from 5.15
run: ./ci/run-migrate 5.15
- name: Migrate from 5.16
run: ./ci/run-migrate 5.16
- name: Migrate from 5.17
run: ./ci/run-migrate 5.17
- name: Migrate from 2026.5
run: ./ci/run-migrate 2026.5
- name: Coverage
run: |
uv run coverage combine
uv run coverage xml
- uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
token: ${{secrets.CODECOV_TOKEN}} # zizmor: ignore[secrets-outside-env]
flags: migrations
name: Migrations postgresql