Skip to content

Commit b14443f

Browse files
committed
Add format check github workflow
1 parent 3e2794c commit b14443f

2 files changed

Lines changed: 43 additions & 0 deletions

File tree

.github/workflows/format.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: format
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
branches:
10+
- '**'
11+
12+
concurrency:
13+
group: format-${{ github.event.pull_request.number || github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
ruff-format:
18+
name: 'Code quality checks'
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout repo
22+
uses: actions/checkout@v4
23+
24+
- name: Install uv
25+
uses: astral-sh/setup-uv@v4
26+
with:
27+
version: 'latest'
28+
29+
- name: Set up Python
30+
run: uv python install 3.10
31+
32+
- name: Install development dependencies
33+
run: uv sync --group dev
34+
35+
- name: Ruff formatter check
36+
id: ruff-format
37+
run: |
38+
uv run ruff format --diff --check .
39+
40+
- name: Ruff linter check
41+
id: ruff-check
42+
run: |
43+
uv run ruff check .

0 commit comments

Comments
 (0)