Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "Continuous Integration"


on:
push:
branches: [main]
pull_request:
schedule:
- cron: "0 2 * * *"

jobs:
tests:
name: python ${{ matrix.python-version }} tests, ${{ matrix.uv-resolution }} dependencies
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
uv-resolution:
- "lowest"
- "highest"
steps:
- uses: actions/checkout@v4

- name: Install uv and set the python version
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
cache-dependency-glob: "**/pyproject.toml"
cache-suffix: ${{ matrix.uv-resolution }}

- name: Install the project
run: uv sync --all-extras --dev --resolution ${{ matrix.uv-resolution }}

- name: Run tests
run: |
uv run pytest --sqlalchemy-connect-url="sqlite:///foo.sqlite"
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,6 @@ docs/_build/

# PyBuilder
target/

# Don't source control the lock file
uv.lock
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.13
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,16 @@ Or override the `sqlalchemy_connect_url` fixture on your conftest file:
def sqlalchemy_connect_url():
return 'postgresql://scott:tiger@localhost:5432/mydatabase'

## Development

To get going, in a checkout:

```bash
uv sync
```

You can then run the tests with:

```bash
uv run pytest
```
37 changes: 37 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[project]
name = "pytest-sqlalchemy"
version = "0.2.0"
description = "pytest plugin with sqlalchemy related fixtures"
authors = [
{ name = "Torsten Irländer", email = "torsten.irlaender@googlemail.com" }
]
license = {text = "MIT"}
readme = "README.rst"
requires-python = ">=3.9"
classifiers = [
"Development Status :: 3 - Alpha",
"Topic :: Software Development :: Testing",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
]
dependencies = [
"pytest>=8.0",
"sqlalchemy>=1.4",
"SQLAlchemy-Utils>=0.41"
]

[dependency-groups]
dev = [
# https://github.com/sqlalchemy/sqlalchemy/pull/12459:
"greenlet>=3.1"
]

[project.urls]
Homepage = "http://github.com/toirl/pytest-sqlalchemy/"

[project.entry-points.pytest11]
sqlalchemy = "pytest_sqlalchemy"

[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
32 changes: 0 additions & 32 deletions setup.py

This file was deleted.