-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (50 loc) · 1.28 KB
/
api-style.yml
File metadata and controls
54 lines (50 loc) · 1.28 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
name: Tekst-API code formatting and style checks
on:
push:
branches:
- development
- main
paths:
- "Tekst-API/tekst/**"
- "Tekst-API/tests/**"
- "Tekst-API/pyproject.toml"
- "Tekst-API/uv.lock"
- ".github/workflows/api-style.yml"
pull_request:
branches:
- development
paths:
- "Tekst-API/tekst/**"
- "Tekst-API/tests/**"
- "Tekst-API/pyproject.toml"
- "Tekst-API/uv.lock"
- ".github/workflows/api-style.yml"
workflow_dispatch:
jobs:
checks:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./Tekst-API
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "0.5.7"
enable-cache: true
- name: Install Python
uses: actions/setup-python@v5
with:
python-version-file: "./Tekst-API/pyproject.toml"
- name: Install dependencies
run: uv sync
- name: Cancel on setup error
if: failure()
uses: andymckay/cancel-action@0.5
- name: Lint code base
if: always()
run: uv run ruff check . --extend-select N
- name: Check code formatting
if: always()
run: uv run ruff format . --check