Skip to content

Commit df9ff72

Browse files
committed
Add CI for qol
1 parent 7a8e1f6 commit df9ff72

2 files changed

Lines changed: 48 additions & 0 deletions

File tree

.github/workflows/qol.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Lint and Type Check
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
qol:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
- uses: actions/setup-python@v4
11+
with:
12+
python-version: '3.11'
13+
- name: Install dependencies
14+
run: |
15+
pip install poetry
16+
poetry install
17+
- name: Lint
18+
run: |
19+
pip install ruff
20+
make lint
21+
- name: Type check
22+
run: |
23+
pip install pyright
24+
make type-check

Makefile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Define variables
2+
PYTHON = python3
3+
PIP = pip3
4+
RUFF = ruff
5+
PYRIGHT = pyright
6+
7+
# Define targets
8+
.PHONY: all lint fix type-check clean
9+
10+
all: lint fix type-check
11+
12+
lint:
13+
$(RUFF) check .
14+
15+
fix:
16+
$(RUFF) check . --fix
17+
18+
type-check:
19+
poetry run $(PYRIGHT)
20+
21+
clean:
22+
rm -rf __pycache__
23+
rm -rf .pytest_cache
24+
rm -rf site

0 commit comments

Comments
 (0)