-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (30 loc) · 847 Bytes
/
code_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
name: Code style & linting
on:
push:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-codestyle-lint
cancel-in-progress: true
jobs:
style:
name: Code style & linting
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v4
- name: Install rye
uses: eifinger/setup-rye@v4
with:
enable-cache: true
- name: Sync dependencies
run: rye sync
- name: Install pre-commit
run: |
rye run -- pre-commit install
- name: Run pre-commit
run: |
rye run -- pre-commit run --all-files --color always --verbose --show-diff-on-failure
- name: Run ruff format
run: rye fmt --check
- name: Run ruff linter
run: rye lint -- --output-format=github