generated from barabum0/python-template-uv
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (42 loc) · 1.05 KB
/
code-linting.yml
File metadata and controls
52 lines (42 loc) · 1.05 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Code linting
on:
pull_request:
branches: ["**"]
jobs:
ruff-format:
runs-on: ubuntu-latest
steps:
- name: Check Out Repository
uses: actions/checkout@v4
- name: Run Ruff format
uses: astral-sh/ruff-action@v3
with:
args: "format --check"
ruff-linter:
runs-on: ubuntu-latest
steps:
- name: Check Out Repository
uses: actions/checkout@v4
- name: Run Ruff linter
uses: astral-sh/ruff-action@v3
with:
args: "check"
mypy:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: read
steps:
- name: Check Out Repository
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set up Python
run: uv python install
- name: Install the project
run: uv sync --all-extras --dev
- name: Check
run: uv run mypy . --config-file pyproject.toml