-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (70 loc) · 2.2 KB
/
Copy pathtests.yml
File metadata and controls
74 lines (70 loc) · 2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Tests
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
workflow_call:
inputs:
ref:
type: string
default: ''
permissions:
contents: read
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python: ['3.10', '3.11', '3.12', '3.13', '3.14']
include:
- os: ubuntu-latest
python: '3.10'
sqlalchemy: '2.0.14'
- os: macos-latest
python: '3.14'
- os: windows-latest
python: '3.14'
steps:
- uses: actions/checkout@v7
with:
ref: ${{ inputs.ref || github.sha }}
persist-credentials: false
- uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python }}
cache: pip
- run: python -m pip install -e ".[test]"
- name: Test the minimum SQLAlchemy version
if: matrix.sqlalchemy
run: python -m pip install "sqlalchemy==${{ matrix.sqlalchemy }}"
- run: python -m pytest -q --cov --cov-report=term-missing
quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
ref: ${{ inputs.ref || github.sha }}
persist-credentials: false
- uses: actions/setup-python@v7
with:
python-version: '3.14'
cache: pip
- run: python -m pip install -e ".[test,dev]"
- run: ruff check .
- run: ruff format --check .
- run: python -m build
- run: python -m twine check --strict dist/*
- name: Install and exercise the built wheel outside the checkout
run: |
python -m venv /tmp/wheel-test
/tmp/wheel-test/bin/python -m pip install dist/*.whl
version=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")
cd /tmp
/tmp/wheel-test/bin/python "$GITHUB_WORKSPACE/scripts/smoke_test.py" "$version"
- name: Audit runtime dependencies
run: |
/tmp/wheel-test/bin/python -m pip freeze | grep -v '^sqlmodel-encrypted-fields' > /tmp/runtime.txt
pip-audit -r /tmp/runtime.txt