-
Notifications
You must be signed in to change notification settings - Fork 4
50 lines (43 loc) · 1.21 KB
/
lint.yml
File metadata and controls
50 lines (43 loc) · 1.21 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
name: Run ruff
on:
workflow_dispatch:
workflow_call:
push:
branches: [main, development]
paths-ignore:
- "**/*.md"
pull_request:
paths-ignore:
- "**/*.md"
permissions:
contents: read
jobs:
ruff:
name: Run ruff check
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install the project
run: uv sync --all-extras --dev
- name: Run ruff check
run: uv run ruff check --output-format=github .
continue-on-error: true
id: ruff-check
- name: Run ruff format check
run: uv run ruff format --check .
continue-on-error: true
id: ruff-format
- name: Report ruff errors
if: steps.ruff-check.outcome == 'failure' || steps.ruff-format.outcome == 'failure'
run: |
echo "::error::Ruff checks failed. Please run 'uv run ruff check --fix .' and 'uv run ruff format .' locally to fix issues."
exit 1