11name : Migrations for SQLite versions
2+
23on : [push, pull_request]
4+
35jobs :
46 pre_job :
57 name : Path match check
@@ -13,33 +15,34 @@ jobs:
1315 with :
1416 github_token : ${{ github.token }}
1517 paths : ' ["morango/migrations/*.py", ".github/workflows/check_migrations_sqlite.yml", "pyproject.toml", "uv.lock"]'
18+
1619 build :
1720 name : Build wheel
1821 needs : pre_job
22+ if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
1923 runs-on : ubuntu-latest
2024 steps :
21- - uses : actions/checkout@v6
25+ - uses : actions/checkout@v6.0.2
2226 with :
2327 fetch-depth : 0
2428 - name : Install uv
25- if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
26- uses : astral-sh/setup-uv@v7
29+ uses : astral-sh/setup-uv@v8.2.0
2730 with :
2831 python-version : 3.9
2932 enable-cache : " true"
3033 - name : Build wheel
31- if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
3234 run : uv build --wheel
3335 - name : Upload wheel artifact
34- if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
35- uses : actions/upload-artifact@v7
36+ uses : actions/upload-artifact@v7.0.1
3637 with :
3738 name : wheel
3839 path : dist/*.whl
3940 retention-days : 1
41+
4042 migration_test :
4143 name : SQLite migration tests
4244 needs : [pre_job, build]
45+ if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
4346 runs-on : ubuntu-latest
4447 container :
4548 image : python:3.7-buster
@@ -52,19 +55,16 @@ jobs:
5255 echo "Acquire::Check-Valid-Until \"false\";" > /etc/apt/apt.conf.d/99archive
5356 apt-get -y -qq update
5457 apt-get install -y build-essential tcl git-lfs
55- - uses : actions/checkout@v6
56- if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
58+ - uses : actions/checkout@v6.0.2
5759 with :
5860 lfs : true
5961 fetch-depth : 0
6062 - name : Download wheel artifact
61- if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
62- uses : actions/download-artifact@v8
63+ uses : actions/download-artifact@v8.0.1
6364 with :
6465 name : wheel
6566 path : dist/
6667 - name : Build SQLite 3.25.3
67- if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
6868 run : |
6969 # Following the instructions from https://til.simonwillison.net/sqlite/ld-preload
7070 # to build SQLite from source, using version 3.25.3
@@ -76,16 +76,21 @@ jobs:
7676 'import sqlite3; assert sqlite3.connect(":memory").execute("select sqlite_version()").fetchone()[0] == "3.25.3"'
7777 # Once we have confirmed that this works, set it for subsequent steps
7878 echo "LD_PRELOAD=$(realpath .libs/libsqlite3.so)" >> $GITHUB_ENV
79- - uses : actions/cache@v5
80- if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
79+ - uses : actions/cache@v5.0.5
8180 with :
8281 path : ~/.cache/pip
8382 key : ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
8483 restore-keys : |
8584 ${{ runner.os }}-pip-
85+ - name : Install uv
86+ uses : astral-sh/setup-uv@v8.2.0
87+ with :
88+ enable-cache : " true"
89+ - name : Manually install test dependencies
90+ run : |
91+ uv pip install --system --group test
8692 - name : Install dependencies
87- if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
88- run : pip install $(ls dist/*.whl | head -n 1)[test]
93+ run : pip install "$(find dist -name '*.whl' | head -n 1)"
8994 - name : Run migrations
9095 if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
9196 run : python tests/testapp/manage.py migrate
0 commit comments