-
-
Notifications
You must be signed in to change notification settings - Fork 984
33 lines (27 loc) · 800 Bytes
/
Copy pathlint.yml
File metadata and controls
33 lines (27 loc) · 800 Bytes
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
---
name: Lint
on: [push, pull_request] # yamllint disable-line rule:truthy
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.10'
- name: Cache pip dependencies
uses: actions/cache@v5
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black==24.2.0 ruff==0.2.1
- name: Check Black formatting
run: black . --check --diff
- name: Run Ruff linting
run: ruff check .