Skip to content

Commit 4dc447b

Browse files
authored
Merge pull request #11 from toirl/uv-and-github-actions
uv and GitHub actions
2 parents 26b644c + 6b7e045 commit 4dc447b

File tree

7 files changed

+96
-45
lines changed

7 files changed

+96
-45
lines changed

.github/workflows/ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: "Continuous Integration"
2+
3+
4+
on:
5+
push:
6+
branches: [main]
7+
pull_request:
8+
schedule:
9+
- cron: "0 2 * * *"
10+
11+
jobs:
12+
tests:
13+
name: python ${{ matrix.python-version }} tests, ${{ matrix.uv-resolution }} dependencies
14+
runs-on: ubuntu-latest
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
python-version:
19+
- "3.9"
20+
- "3.10"
21+
- "3.11"
22+
- "3.12"
23+
- "3.13"
24+
uv-resolution:
25+
- "lowest"
26+
- "highest"
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- name: Install uv and set the python version
31+
uses: astral-sh/setup-uv@v5
32+
with:
33+
python-version: ${{ matrix.python-version }}
34+
cache-dependency-glob: "**/pyproject.toml"
35+
cache-suffix: ${{ matrix.uv-resolution }}
36+
37+
- name: Install the project
38+
run: uv sync --all-extras --dev --resolution ${{ matrix.uv-resolution }}
39+
40+
- name: Run tests
41+
run: |
42+
uv run pytest --sqlalchemy-connect-url="sqlite:///foo.sqlite"

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,6 @@ docs/_build/
5555

5656
# PyBuilder
5757
target/
58+
59+
# Don't source control the lock file
60+
uv.lock

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.13

.travis.yml

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

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,16 @@ Or override the `sqlalchemy_connect_url` fixture on your conftest file:
4646
def sqlalchemy_connect_url():
4747
return 'postgresql://scott:tiger@localhost:5432/mydatabase'
4848

49+
## Development
50+
51+
To get going, in a checkout:
52+
53+
```bash
54+
uv sync
55+
```
56+
57+
You can then run the tests with:
58+
59+
```bash
60+
uv run pytest
61+
```

pyproject.toml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
[project]
2+
name = "pytest-sqlalchemy"
3+
version = "0.2.0"
4+
description = "pytest plugin with sqlalchemy related fixtures"
5+
authors = [
6+
{ name = "Torsten Irländer", email = "torsten.irlaender@googlemail.com" }
7+
]
8+
license = {text = "MIT"}
9+
readme = "README.rst"
10+
requires-python = ">=3.9"
11+
classifiers = [
12+
"Development Status :: 3 - Alpha",
13+
"Topic :: Software Development :: Testing",
14+
"Intended Audience :: Developers",
15+
"Operating System :: OS Independent",
16+
]
17+
dependencies = [
18+
"pytest>=8.0",
19+
"sqlalchemy>=1.4",
20+
"SQLAlchemy-Utils>=0.41"
21+
]
22+
23+
[dependency-groups]
24+
dev = [
25+
# https://github.com/sqlalchemy/sqlalchemy/pull/12459:
26+
"greenlet>=3.1"
27+
]
28+
29+
[project.urls]
30+
Homepage = "http://github.com/toirl/pytest-sqlalchemy/"
31+
32+
[project.entry-points.pytest11]
33+
sqlalchemy = "pytest_sqlalchemy"
34+
35+
[build-system]
36+
requires = ["setuptools>=61.0"]
37+
build-backend = "setuptools.build_meta"

setup.py

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

0 commit comments

Comments
 (0)