Skip to content

Commit

Permalink
Add lint workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanlensky committed Oct 30, 2024
1 parent c1f853e commit acd1b60
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: lint
on:
push:
branches:
- main
pull_request:
branches:
- main
paths:
- "**.py"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Set up Python
run: uv python install
- name: Install dependencies
run: uv sync --all-extras --dev
- name: Lint with ruff/mypy
run: uv run python scripts/lint.sh
5 changes: 4 additions & 1 deletion scripts/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
set -e
set -x

uv run mypy zendriver
echo "Running ruff check..."
uv run ruff check zendriver
echo "Running ruff format check..."
uv run ruff format zendriver --check
echo "Running mypy..."
uv run mypy zendriver

0 comments on commit acd1b60

Please sign in to comment.