Skip to content

Commit 0714efe

Browse files
authored
elax sqlalchemy version pin and add pre-release test workflow (#1)
Relax sqlalchemy version pin and add pre-release test workflow
2 parents 6a9bd5d + a53c9c0 commit 0714efe

9 files changed

Lines changed: 66 additions & 182 deletions

File tree

.github/labeler.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/add-to-project.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/deploy-docs.yml

Lines changed: 0 additions & 82 deletions
This file was deleted.

.github/workflows/labeler.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 31 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,43 @@ name: Publish
22

33
on:
44
release:
5-
types:
6-
- created
7-
workflow_dispatch:
8-
inputs:
9-
debug_enabled:
10-
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
11-
required: false
12-
default: 'false'
5+
types: [published]
136

147
jobs:
158
publish:
16-
runs-on: ubuntu-latest
9+
if: ${{ github.repository == 'Dandelion-Science/sqlmodel' }}
1710
permissions:
1811
id-token: write
19-
contents: read
12+
contents: write
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 10
2015
steps:
21-
- name: Dump GitHub context
22-
env:
23-
GITHUB_CONTEXT: ${{ toJson(github) }}
24-
run: echo "$GITHUB_CONTEXT"
2516
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
26-
- name: Set up Python
27-
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
17+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
2818
with:
2919
python-version-file: ".python-version"
30-
- name: Install uv
31-
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
32-
- name: Build distribution
33-
run: uv build
34-
- name: Publish
35-
run: uv publish
20+
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
21+
- run: uv build
22+
- uses: softprops/action-gh-release@v2
23+
with:
24+
files: |
25+
dist/*.whl
26+
dist/*.tar.gz
27+
tag_name: ${{ github.event.release.tag_name }}
28+
- uses: aws-actions/configure-aws-credentials@v6
29+
with:
30+
aws-region: ${{ vars.AWS_REGION }}
31+
role-to-assume: ${{ vars.ARN_IAM_ROLE_GHA_CORE }}
32+
- name: Get CodeArtifact authorization token
33+
run: |
34+
AWS_CODEARTIFACT_TOKEN=$(aws codeartifact get-authorization-token \
35+
--domain ${{ vars.CODEARTIFACT_DOMAIN }} \
36+
--domain-owner ${{ vars.CODEARTIFACT_DOMAIN_OWNER }} \
37+
--query authorizationToken \
38+
--output text)
39+
echo "AWS_CODEARTIFACT_TOKEN=$AWS_CODEARTIFACT_TOKEN" >> $GITHUB_ENV
40+
- run: uv publish
41+
env:
42+
UV_PUBLISH_USERNAME: aws
43+
UV_PUBLISH_PASSWORD: ${{ env.AWS_CODEARTIFACT_TOKEN }}
44+
UV_PUBLISH_URL: ${{ vars.CODEARTIFACT_PYPI_STORE_REPOSITORY_URL }}

.github/workflows/test.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,38 @@ jobs:
8484
path: coverage
8585
include-hidden-files: true
8686

87+
test-sqlalchemy-prerelease:
88+
# Run tests against the latest SQLAlchemy pre-release to catch compatibility
89+
# issues early. This job is intentionally not required by alls-green.
90+
runs-on: ubuntu-latest
91+
env:
92+
UV_PYTHON: "3.14"
93+
UV_RESOLUTION: highest
94+
UV_PRERELEASE: allow
95+
steps:
96+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
97+
- name: Set up Python
98+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
99+
with:
100+
python-version: "3.14"
101+
- name: Setup uv
102+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
103+
with:
104+
enable-cache: true
105+
cache-dependency-glob: |
106+
pyproject.toml
107+
uv.lock
108+
- name: Install Dependencies
109+
run: uv sync --no-dev --group tests --upgrade-package sqlalchemy
110+
- name: Show SQLAlchemy version
111+
run: uv run python -c "import sqlalchemy; print(f'SQLAlchemy {sqlalchemy.__version__}')"
112+
- run: mkdir coverage
113+
- name: Test
114+
run: uv run bash scripts/test.sh
115+
env:
116+
COVERAGE_FILE: coverage/.coverage.sqlalchemy-prerelease
117+
CONTEXT: sqlalchemy-prerelease
118+
87119
coverage-combine:
88120
needs:
89121
- test

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ classifiers = [
3535
]
3636

3737
dependencies = [
38-
"SQLAlchemy >=2.0.14,<2.1.0",
38+
"SQLAlchemy >=2.0.14,<2.2.0",
3939
"pydantic>=2.11.0",
4040
"typing-extensions>=4.5.0",
4141
]

sqlmodel/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "0.0.38"
1+
__version__ = "0.0.38.post1"
22

33
# Re-export from SQLAlchemy
44
from sqlalchemy.engine import create_engine as create_engine

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)