Skip to content

Commit a044f23

Browse files
committed
add ruff action workflow
1 parent fd814e9 commit a044f23

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

.github/workflows/lint.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Lint
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v2
11+
12+
- name: Set up Python
13+
uses: actions/setup-python@v4
14+
with:
15+
python-version: '3.10' # or any version your project uses
16+
17+
- name: Install dependencies
18+
run: |
19+
python -m pip install --upgrade pip
20+
pip install black ruff
21+
22+
- name: Run Black
23+
run: black --check .
24+
25+
- name: Run Ruff (no formatting)
26+
run: ruff check . --no-fix

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ repos:
2828
rev: v0.12.1
2929
hooks:
3030
- id: ruff
31-
args: [] # No --fix, disables formatting
31+
args: [--fix]

0 commit comments

Comments
 (0)