Skip to content

Commit a5864ae

Browse files
author
Mattia Baldari
committed
Add GitHub Actions workflow for linting
Add CI workflow that runs on push to master and on pull requests: - Runs ruff linter - Checks code formatting with ruff format This ensures code quality checks run even for contributors who haven't installed pre-commit hooks locally.
1 parent 4cecf4a commit a5864ae

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/lint.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
ruff:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Set up Python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: '3.13'
19+
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install ruff
24+
25+
- name: Run ruff linter
26+
run: ruff check .
27+
28+
- name: Run ruff formatter check
29+
run: ruff format --check .

0 commit comments

Comments
 (0)