Skip to content

Merge branch 'WeblateOrg:main' into main #20

Merge branch 'WeblateOrg:main' into main

Merge branch 'WeblateOrg:main' into main #20

Workflow file for this run

# Copyright © Michal Čihař <[email protected]>
#
# 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-22.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
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
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: |-
3.11
cache: pip
cache-dependency-path: '**/requirements*.txt'
- name: Install pip dependencies
run: |
./ci/pip-install migrations
- name: Check missing migrations
run: ./ci/run-checkmigrate
- name: Migrate from 5.0
run: ./ci/run-migrate 5.0.2
- name: Coverage
run: |
coverage combine
coverage xml
- uses: codecov/codecov-action@v3
with:
token: ${{secrets.CODECOV_TOKEN}}
flags: migrations
name: Migrations ${{ matrix.database }}
- name: Stop services
if: always()
run: ./ci/services-down ${{ matrix.database }}