Skip to content

Commit b1abc9b

Browse files
committed
Postgres and crypto are optionals, the others are groups
1 parent 4f82b63 commit b1abc9b

11 files changed

Lines changed: 172 additions & 124 deletions

File tree

.github/actionlint.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
paths:
2+
.github/workflows/check_migrations_sqlite.yml:
3+
ignore:
4+
- 'SC2086:info:10:54'

.github/workflows/check-docs.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: Docs
2+
23
on: [push, pull_request]
4+
35
jobs:
46
pre_job:
57
name: Path match check
@@ -13,26 +15,27 @@ jobs:
1315
with:
1416
github_token: ${{ github.token }}
1517
paths: '["docs/**", "pyproject.toml", "uv.lock"]'
18+
1619
docs:
1720
name: Checking docs build
1821
needs: pre_job
1922
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
2023
runs-on: ubuntu-latest
2124
steps:
22-
- uses: actions/checkout@v6
25+
- uses: actions/checkout@v6.0.2
2326
with:
2427
fetch-depth: 0
2528
- name: Install system dependencies
2629
run: |
2730
sudo apt-get -y -qq update
2831
sudo apt-get install -y swig openssl libssl-dev
2932
- name: Install uv
30-
uses: astral-sh/setup-uv@v7
33+
uses: astral-sh/setup-uv@v8.2.0
3134
with:
3235
python-version: "3.10"
3336
activate-environment: "true"
3437
enable-cache: "true"
3538
- name: Install dependencies
36-
run: uv sync --extra docs
39+
run: uv sync --frozen --group docs
3740
- name: Check Docs build
3841
run: make docs
Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: Migrations for SQLite versions
2+
23
on: [push, pull_request]
4+
35
jobs:
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

.github/workflows/python-publish.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
1-
# This workflow will upload a Python Package using uv when a release is created
2-
# uv provides fast, modern Python package building and publishing
3-
41
name: Upload Python Package
2+
53
on:
64
release:
75
types: [published]
6+
87
jobs:
98
deploy:
109
runs-on: ubuntu-22.04
1110
steps:
12-
- uses: actions/checkout@v6
11+
- uses: actions/checkout@v6.0.2
1312
with:
1413
fetch-depth: 0
1514
- name: Install uv
16-
uses: astral-sh/setup-uv@v7
15+
uses: astral-sh/setup-uv@v8.2.0
1716
with:
1817
python-version: 3.9
1918
activate-environment: "true"

0 commit comments

Comments
 (0)