mirror of
https://gh.wpcy.net/https://github.com/WeblateOrg/weblate.git
synced 2026-04-28 14:57:13 +08:00
* chore(deps): update dependency astral-sh/uv to v0.11.6 * chore(deps): update lockfile --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
113 lines
3.3 KiB
YAML
113 lines
3.3 KiB
YAML
# Copyright © Michal Čihař <michal@weblate.org>
|
|
#
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
name: Migrations
|
|
|
|
on:
|
|
push:
|
|
branches-ignore:
|
|
- renovate/**
|
|
- weblate
|
|
- dependabot/**
|
|
pull_request:
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || 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.3-alpine@sha256:4da1a4828be12604092fa55311276f08f9224a74a62dcb4708bd7439e2a03911
|
|
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
- name: Install apt dependencies
|
|
run: sudo ./ci/apt-install
|
|
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.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.6
|
|
- 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.0
|
|
run: ./ci/run-migrate 5.0.2
|
|
- name: Migrate from 5.1
|
|
run: ./ci/run-migrate 5.1.1
|
|
- name: Migrate from 5.2
|
|
run: ./ci/run-migrate 5.2.1
|
|
- name: Migrate from 5.3
|
|
run: ./ci/run-migrate 5.3.1
|
|
- name: Migrate from 5.4
|
|
run: ./ci/run-migrate 5.4.3
|
|
- name: Migrate from 5.5
|
|
run: ./ci/run-migrate 5.5
|
|
- name: Migrate from 5.6
|
|
run: ./ci/run-migrate 5.6
|
|
- name: Migrate from 5.7
|
|
run: ./ci/run-migrate 5.7
|
|
- name: Migrate from 5.8
|
|
run: ./ci/run-migrate 5.8
|
|
- name: Migrate from 5.9
|
|
run: ./ci/run-migrate 5.9
|
|
- 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: Coverage
|
|
run: |
|
|
uv run coverage combine
|
|
uv run coverage xml
|
|
- uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
|
|
with:
|
|
token: ${{secrets.CODECOV_TOKEN}} # zizmor: ignore[secrets-outside-env]
|
|
flags: migrations
|
|
name: Migrations postgresql
|