Skip to content

Commit

Permalink
Add linters
Browse files Browse the repository at this point in the history
  • Loading branch information
tombruijn committed Jan 11, 2024
1 parent 791e32c commit 51c1269
Showing 1 changed file with 37 additions and 1 deletion.
38 changes: 37 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Python package
on: [push]
jobs:
build:
test:
name: "Test Python ${{ matrix.python-version }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -16,3 +17,38 @@ jobs:
run: "pip install hatch"
- name: "Run tests"
run: "hatch -v run test.py$(echo ${{ matrix.python-version }} | tr -d '.'):pytest"

lint-style:
name: "Style linter"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.12
- name: "Install hatch"
run: "pip install hatch"
- name: "Run style linter"
run: "hatch -v run lint:style"

lint-typing:
name: "Typing linter"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.12
- name: "Install hatch"
run: "pip install hatch"
- name: "Run typing linter"
run: "hatch -v run lint:typing"

lint-git:
name: "Git linter (Lintje)"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch depth is required
- uses: lintje/[email protected]

0 comments on commit 51c1269

Please sign in to comment.