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
25 changes: 12 additions & 13 deletions .github/workflows/python-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,41 +14,40 @@ permissions:

jobs:
build:
name: Setup ${{ matrix.python }} ${{ matrix.os }}
name: ${{ matrix.os }} running python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
python: [3.11.9, 3.13.0]
python-version: [3.9.3, 3.13.0]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v5

- name: setup-python ${{ matrix.python }}
uses: actions/setup-python@v3
- name: Install uv and set the Python version ${{ matrix.python-version }}
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python }}
python-version: ${{ matrix.python-version }}

- name: Validate version
run: |
$pythonVersion = (python --version)
if ("Python ${{ matrix.python }}" -ne "$pythonVersion"){
Write-Host "The current version is $pythonVersion; expected version is ${{ matrix.python }}"
$pythonVersion = (uv run python --version)
if ("Python ${{ matrix.python-version }}" -ne "$pythonVersion"){
Write-Host "The current version is $pythonVersion; expected version is ${{ matrix.python-version }}"
exit 1
}
$pythonVersion
shell: pwsh

- name: Build Package
run: |
python -m pip install --upgrade pip
uv sync --locked --all-extras --dev
pip install ".[dev]"

- name: Test Package
run: pytest
run: uv run pytest

- name: Test Examples
run: |
pip install treon
treon
uv run treon
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ repos:
hooks:
- id: pytest
name: pytest
entry: pytest
entry: uv run pytest
pass_filenames: false
always_run: true
language: system
Expand Down
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@ Repository = "https://github.com/aloosley/persistable"

[dependency-groups]
dev = [
"build>=1.3.0",
"hatch>=1.14.1",
"pre-commit>=2.19.0",
"pytest>=7.1.2",
"pytest-cov>=7.0.0",
"treon>=0.1.4",
"twine>=6.2.0",
]

[build-system]
Expand Down
Loading
Loading