-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (43 loc) · 1.04 KB
/
server-style.yml
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
name: Style Checks
on:
push:
branches:
- main
paths:
- 'Tekst-API/tekst/**'
- 'Tekst-API/tests/**'
- 'Tekst-API/pyproject.toml'
pull_request:
branches:
- main
paths:
- 'Tekst-API/tekst/**'
- 'Tekst-API/tests/**'
- 'Tekst-API/pyproject.toml'
workflow_dispatch:
jobs:
checks:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./Tekst-API
steps:
- uses: actions/checkout@v3
- name: Install Poetry
uses: snok/install-poetry@v1
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'poetry'
cache-dependency-path: './Tekst-API/poetry.lock'
- name: Install dependencies
run: poetry install --sync
- name: Cancel on setup error
if: failure()
uses: andymckay/[email protected]
- name: Lint code base
if: always()
run: poetry run ruff check . --extend-select N
- name: Check code formatting
if: always()
run: poetry run ruff format . --check