Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: test against python 3.12 and 3.13; add pyright to CI #23

Merged
merged 6 commits into from
Feb 11, 2025
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
70 changes: 70 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Tests and Linting

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
name: "Test (${{ matrix.python-version }})"
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Install dependencies
run: uv sync

- name: Run tests
run: uv run pytest

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Install dependencies
run: uv sync

- name: Run lint checks
run: uv run ruff check
- name: Run formatting
run: uv run ruff format --check

pyright:
name: Pyright
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Install dependencies
run: uv sync

- name: Run pyright
run: uv run pyright
29 changes: 0 additions & 29 deletions .github/workflows/test.yml

This file was deleted.

5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ version = "0.4.0"
description = "Generate pixel graphics for the Tidbyt"
authors = [{ name = "Tom MacWright", email = "[email protected]" }]
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
readme = "README.md"
requires-python = ">=3.12"
Expand All @@ -32,6 +34,7 @@ dev = [
"ruff>=0.8.2",
"pytest>=8.3.4",
"pre-commit>=4.1.0",
"pyright>=1.1.393",
"syrupy>=4.8.1",
]
examples = ["flask>=3.1.0", "gunicorn>=23.0.0", "pytz>=2024.2"]
Expand Down
24 changes: 24 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.