Skip to content

Feature/refactor

Feature/refactor #4

Workflow file for this run

# .github/workflows/ci.yml
name: Python Package CI
# Run on pushes to main and any pull requests
on:
push:
branches: [main] # Or your default branch (e.g., master)
pull_request:
branches: [main] # Or your default branch
jobs:
build_and_test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false # Keep running other matrix jobs even if one fails
matrix:
os: [ubuntu-latest] # Could add macos-latest, windows-latest if needed
# Test against python versions declared compatible in pyproject.toml
python-version: ["3.10", "3.11", "3.12", "3.13"] # Add more versions as needed
steps:
- name: Checkout repository
uses: actions/checkout@v4 # Updated version
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4 # Updated version
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "latest"
- name: Install dependencies
run: |
uv sync --all-extras --dev
- name: Test with pytest
run: |
uv run pytest tests/
# Optional, but good practice: Ensure the package builds correctly
- name: Build package
if: matrix.python-version == '3.10' && matrix.os == 'ubuntu-latest' # Only build once
run: uv build