-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (55 loc) · 1.71 KB
/
Copy pathpython.yml
File metadata and controls
68 lines (55 loc) · 1.71 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Python
on:
pull_request:
branches: [main]
jobs:
python:
name: Python (Ruff)
runs-on: ubuntu-latest
defaults:
run:
working-directory: dashboard/services/home-relay
steps:
- uses: actions/checkout@v7
- name: Check for Python changes
id: changes
uses: dorny/paths-filter@v4
with:
filters: |
python:
- 'dashboard/services/home-relay/**'
- name: Install uv
if: steps.changes.outputs.python == 'true'
uses: astral-sh/setup-uv@v8.2.0
- name: Set up Python
if: steps.changes.outputs.python == 'true'
run: uv python install
- name: Install dependencies
if: steps.changes.outputs.python == 'true'
run: uv sync --group dev
- name: Lint
if: steps.changes.outputs.python == 'true'
run: uv run ruff check .
- name: Format
if: steps.changes.outputs.python == 'true'
run: uv run ruff format --check .
- name: Type check
if: steps.changes.outputs.python == 'true'
run: uv run pyright
- uses: pnpm/action-setup@v6
if: steps.changes.outputs.python == 'true'
- uses: actions/setup-node@v6
if: steps.changes.outputs.python == 'true'
with:
node-version: 24
cache: pnpm
- name: Install Node dependencies
if: steps.changes.outputs.python == 'true'
working-directory: .
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pnpm install --frozen-lockfile
- name: Check generated API client
if: steps.changes.outputs.python == 'true'
working-directory: .
run: pnpm gen:api:check