feat: support --fake for aerich upgrade (#398)
* feat: support `--fake` for aerich upgrade * Add `--fake` to downgrade * tests: check --fake result for aerich upgrade and downgrade * Update readme * Fix unittest failed because of `db_field_types` changed * refactor: improve type hints and document
This commit is contained in:
26
.github/workflows/ci.yml
vendored
26
.github/workflows/ci.yml
vendored
@@ -25,20 +25,20 @@ jobs:
|
||||
- tortoise021
|
||||
- tortoise022
|
||||
- tortoise023
|
||||
- tortoisedev
|
||||
- tortoise024
|
||||
steps:
|
||||
- name: Start MySQL
|
||||
run: sudo systemctl start mysql.service
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/poetry.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install and configure Poetry
|
||||
run: |
|
||||
pip install -U pip poetry
|
||||
@@ -54,11 +54,23 @@ jobs:
|
||||
- name: Install TortoiseORM v0.23
|
||||
if: matrix.tortoise-orm == 'tortoise023'
|
||||
run: poetry run pip install --upgrade "tortoise-orm>=0.23,<0.24"
|
||||
- name: Install TortoiseORM v0.24
|
||||
if: matrix.tortoise-orm == 'tortoise024'
|
||||
run: |
|
||||
if [[ "${{ matrix.python-version }}" == "3.8" ]]; then
|
||||
echo "Skip test for tortoise v0.24 as it does not support Python3.8"
|
||||
else
|
||||
poetry run pip install --upgrade "tortoise-orm>=0.24,<0.25"
|
||||
fi
|
||||
- name: Install TortoiseORM develop branch
|
||||
if: matrix.tortoise-orm == 'tortoisedev'
|
||||
run: |
|
||||
poetry run pip uninstall -y tortoise-orm
|
||||
poetry run pip install --upgrade "git+https://github.com/tortoise/tortoise-orm"
|
||||
if [[ "${{ matrix.python-version }}" == "3.8" ]]; then
|
||||
echo "Skip test for tortoise develop branch as it does not support Python3.8"
|
||||
else
|
||||
poetry run pip uninstall -y tortoise-orm
|
||||
poetry run pip install --upgrade "git+https://github.com/tortoise/tortoise-orm"
|
||||
fi
|
||||
- name: CI
|
||||
env:
|
||||
MYSQL_PASS: root
|
||||
|
||||
Reference in New Issue
Block a user