Skip to content

Commit 81ad5b4

Browse files
authored
Add Python checks workflow for CI
1 parent 60cf2eb commit 81ad5b4

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Python Checks
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Auto Tag"]
6+
types: [completed]
7+
branches: [main]
8+
pull_request:
9+
branches: [ main ]
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'pull_request' }}
15+
strategy:
16+
matrix:
17+
python-version: ["3.12", "3.13"]
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Install uv
23+
uses: astral-sh/setup-uv@v5
24+
25+
- name: Set up Python ${{ matrix.python-version }}
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: ${{ matrix.python-version }}
29+
30+
- name: Install dependencies
31+
run: uv pip install --system -e ".[dev]"
32+
33+
- name: Install ruff
34+
run: uv pip install --system ruff
35+
36+
- name: Lint with ruff
37+
run: |
38+
ruff check --output-format=github --select=E9,F63,F7,F82 .
39+
40+
- name: Test with pytest
41+
run: uv run pytest

0 commit comments

Comments
 (0)