-
-
Notifications
You must be signed in to change notification settings - Fork 1k
91 lines (86 loc) · 2.41 KB
/
migrations.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Copyright © Michal Čihař <michal@weblate.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
name: Migrations
on:
push:
branches-ignore:
- deepsource-fix-**
- renovate/**
- weblate
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
strategy:
matrix:
database: [postgresql, mysql]
fail-fast: false
name: ${{ matrix.database }}
env:
CI_DATABASE: ${{ matrix.database }}
CI_DB_PASSWORD: weblate
CI_DB_HOST: 127.0.0.1
CI_DB_PORT: '60000'
CI_SELENIUM: '1'
DJANGO_SETTINGS_MODULE: weblate.settings_test
UV_FROZEN: '1'
steps:
- uses: actions/checkout@v4
- name: Start services
run: ./ci/services-up ${{ matrix.database }}
- name: Install apt dependencies
run: sudo ./ci/apt-install $CI_DATABASE
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: ''
# Do not share cache with tests as this uses python 3.11 for older versions
cache-suffix: multi
- name: Set up Python
uses: actions/setup-python@v5
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: Coverage
run: |
uv run --no-sources coverage combine
uv run --no-sources coverage xml
- uses: codecov/codecov-action@v5
with:
token: ${{secrets.CODECOV_TOKEN}}
flags: migrations
name: Migrations ${{ matrix.database }}
- name: Stop services
if: always()
run: ./ci/services-down ${{ matrix.database }}