-
Notifications
You must be signed in to change notification settings - Fork 2
34 lines (27 loc) · 798 Bytes
/
on-commit.yml
File metadata and controls
34 lines (27 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Run tests and style checks on each commit to an open pull request.
name: on-commit
on: [pull_request, workflow_dispatch]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.12', '3.13', '3.14', '3.14t', 'pypy3.11']
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v6
with:
version: "0.9.7"
- name: Check types with mypy
run: uv run --python ${{ matrix.python-version }} mypy
- name: Test with pytest
run: uv run --python ${{ matrix.python-version }} pytest
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v6
- name: Lint
run: uvx ruff check
- name: Check formatting
run: uvx ruff format --check