Skip to content

Commit 8767128

Browse files
committed
feat: add ruff linter to Makefile and qa.yml CI workflow
1 parent 7cef3e1 commit 8767128

File tree

3 files changed

+49
-0
lines changed

3 files changed

+49
-0
lines changed

.github/workflows/qa.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: qa
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.12"
20+
21+
- name: Install Poetry
22+
uses: snok/install-poetry@v1
23+
with:
24+
virtualenvs-create: true
25+
virtualenvs-in-project: true
26+
27+
- name: Install dependencies
28+
run: poetry install --no-interaction
29+
30+
- name: Lint
31+
run: poetry run ruff check .

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,16 @@ dev-push:
4747
@git commit -m "$$(read -p 'Commit message: ' msg; echo $$msg)" || true
4848
@git push
4949

50+
## ==================
51+
## Quality Assurance
52+
## ==================
53+
54+
.PHONY: lint
55+
56+
lint:
57+
@echo "Running ruff linter..."
58+
@poetry run ruff check .
59+
5060
## ================
5161
## Release Commands
5262
## ================

pyproject.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,18 @@ httpx = "^0.24.0"
1212

1313
[tool.poetry.group.dev.dependencies]
1414
pytest = "^8.0"
15+
ruff = "^0.4"
1516

1617
[tool.pytest.ini_options]
1718
testpaths = ["tests"]
1819

20+
[tool.ruff]
21+
line-length = 120
22+
target-version = "py310"
23+
24+
[tool.ruff.lint]
25+
select = ["E", "F", "W", "I"]
26+
1927
[build-system]
2028
requires = ["poetry-core"]
2129
build-backend = "poetry.core.masonry.api"

0 commit comments

Comments
 (0)