11name : Migrations for SQLite versions
2+
23on : [push, pull_request]
4+
5+ concurrency :
6+ group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
7+ cancel-in-progress : true
8+
39jobs :
410 pre_job :
511 name : Path match check
@@ -13,33 +19,34 @@ jobs:
1319 with :
1420 github_token : ${{ github.token }}
1521 paths : ' ["morango/migrations/*.py", ".github/workflows/check_migrations_sqlite.yml", "pyproject.toml", "uv.lock"]'
22+
1623 build :
1724 name : Build wheel
1825 needs : pre_job
26+ if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
1927 runs-on : ubuntu-latest
2028 steps :
21- - uses : actions/checkout@v6
29+ - uses : actions/checkout@v6.0.2
2230 with :
2331 fetch-depth : 0
2432 - name : Install uv
25- if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
26- uses : astral-sh/setup-uv@v7
33+ uses : astral-sh/setup-uv@v8.2.0
2734 with :
2835 python-version : 3.9
2936 enable-cache : " true"
3037 - name : Build wheel
31- if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
3238 run : uv build --wheel
3339 - name : Upload wheel artifact
34- if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
35- uses : actions/upload-artifact@v7
40+ uses : actions/upload-artifact@v7.0.1
3641 with :
3742 name : wheel
3843 path : dist/*.whl
3944 retention-days : 1
45+
4046 migration_test :
4147 name : SQLite migration tests
4248 needs : [pre_job, build]
49+ if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
4350 runs-on : ubuntu-latest
4451 container :
4552 image : python:3.7-buster
@@ -52,19 +59,16 @@ jobs:
5259 echo "Acquire::Check-Valid-Until \"false\";" > /etc/apt/apt.conf.d/99archive
5360 apt-get -y -qq update
5461 apt-get install -y build-essential tcl git-lfs
55- - uses : actions/checkout@v6
56- if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
62+ - uses : actions/checkout@v6.0.2
5763 with :
5864 lfs : true
5965 fetch-depth : 0
6066 - name : Download wheel artifact
61- if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
62- uses : actions/download-artifact@v8
67+ uses : actions/download-artifact@v8.0.1
6368 with :
6469 name : wheel
6570 path : dist/
6671 - name : Build SQLite 3.25.3
67- if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
6872 run : |
6973 # Following the instructions from https://til.simonwillison.net/sqlite/ld-preload
7074 # to build SQLite from source, using version 3.25.3
@@ -76,16 +80,21 @@ jobs:
7680 'import sqlite3; assert sqlite3.connect(":memory").execute("select sqlite_version()").fetchone()[0] == "3.25.3"'
7781 # Once we have confirmed that this works, set it for subsequent steps
7882 echo "LD_PRELOAD=$(realpath .libs/libsqlite3.so)" >> $GITHUB_ENV
79- - uses : actions/cache@v5
80- if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
83+ - uses : actions/cache@v5.0.5
8184 with :
8285 path : ~/.cache/pip
8386 key : ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
8487 restore-keys : |
8588 ${{ runner.os }}-pip-
89+ - name : Install uv
90+ uses : astral-sh/setup-uv@v8.2.0
91+ with :
92+ enable-cache : " true"
93+ - name : Manually install test dependencies
94+ run : |
95+ uv pip install --system --group test
8696 - name : Install dependencies
87- if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
88- run : pip install $(ls dist/*.whl | head -n 1)[test]
97+ run : pip install "$(find dist -name '*.whl' | head -n 1)"
8998 - name : Run migrations
9099 if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
91100 run : python tests/testapp/manage.py migrate
0 commit comments