Clarify dep. #15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: CI | |
on: | |
push: | |
# Use ["main", "master"] for CI only on the default branch. | |
# Use ["**"] for CI on all branches. | |
branches: ["main", "master"] | |
pull_request: | |
branches: ["main", "master"] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
strategy: | |
matrix: | |
# Update this as needed: | |
# Common platforms: ["ubuntu-latest", "macos-latest", "windows-latest"] | |
os: ["ubuntu-latest"] | |
python-version: ["3.10", "3.11", "3.12", "3.13"] | |
# Linux only by default. Use ${{ matrix.os }} for other OSes. | |
runs-on: ${{ matrix.os }} | |
steps: | |
# Generally following uv docs: | |
# https://docs.astral.sh/uv/guides/integration/github/ | |
- name: Checkout (official GitHub action) | |
uses: actions/checkout@v4 | |
with: | |
# Important for versioning plugins: | |
fetch-depth: 0 | |
- name: Install uv (official Astral action) | |
uses: astral-sh/setup-uv@v5 | |
with: | |
version: "0.6.5" | |
enable-cache: true | |
python-version: ${{ matrix.python-version }} | |
- name: Set up Python (using uv) | |
run: uv python install | |
# Alternately can use the official Python action: | |
# - name: Set up Python (using actions/setup-python) | |
# uses: actions/setup-python@v5 | |
# with: | |
# python-version: ${{ matrix.python-version }} | |
- name: Install all dependencies | |
run: uv sync --all-extras --dev | |
- name: Run linting | |
run: uv run python devtools/lint.py | |
- name: Run tests | |
run: uv run pytest |