Skip to content

fix: keep backward compatibility with old-format migration files #652

fix: keep backward compatibility with old-format migration files

fix: keep backward compatibility with old-format migration files #652

Workflow file for this run

name: ci
on:
push:
branches-ignore:
- dev
paths-ignore:
- "*.md"
pull_request:
branches:
- dev
paths-ignore:
- "*.md"
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9, 3.14]
steps:
- uses: actions/checkout@v6
- name: Setup Python
id: setup-python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
activate-environment: true
- name: Check code style and Type Hints
run: make check
ci:
runs-on: ubuntu-latest
needs: lint
services:
postgres:
image: postgres
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: 123456
POSTGRES_USER: postgres
options: --health-cmd=pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
tortoise-orm:
- tortoise021
- tortoise022
- tortoise023
- tortoise024
- tortoise025
- tortoise11
exclude:
- python-version: "3.9"
tortoise-orm: "tortoise11"
steps:
- name: Start MySQL
run: sudo systemctl start mysql.service
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
enable-cache: true
activate-environment: true
- name: Install dependencies
run: make deps options='--no-extra=psycopg'
- name: Install TortoiseORM v0.21
if: matrix.tortoise-orm == 'tortoise021'
run: |
uv pip install --upgrade "tortoise-orm>=0.21,<0.22"
uv pip install --upgrade "aiosqlite<0.22"
- name: Install TortoiseORM v0.22
if: matrix.tortoise-orm == 'tortoise022'
run: |
uv pip install --upgrade "tortoise-orm>=0.22,<0.23"
uv pip install --upgrade "aiosqlite<0.22"
- name: Install TortoiseORM v0.23
if: matrix.tortoise-orm == 'tortoise023'
run: |
uv pip install --upgrade "tortoise-orm>=0.23,<0.24"
uv pip install --upgrade "aiosqlite<0.22"
- name: Install TortoiseORM v0.24
if: matrix.tortoise-orm == 'tortoise024'
run: |
uv pip install --upgrade "tortoise-orm>=0.24,<0.25"
uv pip install --upgrade "aiosqlite<0.22"
- name: Install TortoiseORM v0.25
if: matrix.tortoise-orm == 'tortoise025'
run: uv pip install --upgrade "tortoise-orm>=0.25,<0.26"
- name: Install TortoiseORM v1.1
if: matrix.tortoise-orm == 'tortoise11'
run: uv pip install --upgrade "tortoise-orm<1.2"
- name: Run tests for postgres
run:
make test_postgres
env:
POSTGRES_PASS: 123456
POSTGRES_HOST: 127.0.0.1
POSTGRES_PORT: 5432
- name: Run tests for mysql
run:
make test_mysql
env:
MYSQL_PASS: root
MYSQL_HOST: 127.0.0.1
MYSQL_PORT: 3306
- name: Run tests for sqlite
run:
make test_sqlite
- name: Show test coverage
run: make report
nuitkaSupport:
runs-on: ubuntu-latest
needs: lint
strategy:
matrix:
python-version: [3.13]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
enable-cache: true
activate-environment: true
- name: Install dependencies
run: |
make deps options='--no-dev --no-group test'
uv pip install nuitka
sudo apt install -y patchelf
- name: Run tests for nuitka
run: |
cd tests/assets/nuitka_project
./build.sh
./dist/main.dist/minirepro
uv pip install imp2importlib
./build.sh
./dist/main.dist/minirepro
asyncmySupport:
runs-on: ubuntu-latest
needs: lint
steps:
- name: Start MySQL
run: sudo systemctl start mysql.service
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
enable-cache: true
python-version: '3.13'
activate-environment: true
- name: Install dependencies
run: uv sync --group test --extra toml --extra asyncmy
- name: Test MySQL with asyncmy
run: make test_mysql
env:
MYSQL_PASS: root
MYSQL_HOST: 127.0.0.1
MYSQL_PORT: 3306
# Verify `poetry add aerich` work
AERICH_TEST_POETRY_ADD: 1
- name: Show test coverage
run: make report
postgresVector:
runs-on: ubuntu-latest
needs: lint
services:
postgres:
image: ankane/pgvector:latest
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: 123456
POSTGRES_USER: postgres
options: --health-cmd=pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
enable-cache: true
python-version: '3.13'
activate-environment: true
- name: Install dependencies
run: uv pip install --group vector --group test -e ".[toml,mysql]"
- name: Test tortoise vector
run: make test_postgres_vector
env:
POSTGRES_PASS: 123456
POSTGRES_HOST: 127.0.0.1
POSTGRES_PORT: 5432
- name: Show test coverage
run: make report
psycopgSupport:
runs-on: ${{ matrix.os }}
needs: lint
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '3.13'
- uses: ikalnytskyi/action-setup-postgres@v7
with:
username: postgres
password: 123456
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
enable-cache: true
activate-environment: true
- name: Install dependencies
run: |
uv pip install --group test -e ".[toml,psycopg,mysql]"
- name: Test psycopg
run: make test_psycopg
env:
POSTGRES_HOST: 127.0.0.1
POSTGRES_PASS: 123456
POSTGRES_PORT: 5432
- name: Show test coverage
run: make report