# This workflow will install Python dependencies, run tests and lint with a variety of Python versions # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python name: Python package on: push: branches: [ "master" ] pull_request: branches: [ "master" ] workflow_dispatch: jobs: build: strategy: fail-fast: false matrix: os: ["ubuntu-24.04", "ubuntu-22.04"] python: ["3.9", "3.10", "3.11", "3.12"] #Disable 3.13 until https://github.com/TheKevJames/coveralls-python/issues/549 is fixed runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - name: Install uv uses: astral-sh/setup-uv@v6 with: python-version: ${{ matrix.python }} enable-cache: true activate-environment: true - name: Lint with Ruff run: | uv tool install ruff uv run ruff check --output-format=github . continue-on-error: false - name: Install dependencies run: | if [ "${{ matrix.python-version }}" != "3.13" ]; then # workaround for TheKevJames/coveralls-python#523 uv pip install coveralls fi uv pip install mypy uv sync --locked --all-extras --dev - name: Run tests run: | if [ "${{ matrix.python-version }}" == "3.13" ]; then # workaround for TheKevJames/coveralls-python#523 uv run python -m coverage run -m pytest --no-cov src else uv run python -m coverage erase uv run python -m coverage run -m pytest --cov=src/pyff mv .coverage .coverage.1 uv run python -m coverage combine fi #make typecheck