Skip to content

Commit

Permalink
test adding lint.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Snaacky committed Dec 24, 2024
1 parent 590a322 commit be7d122
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Lint, Format, and Type Check

on:
push:
# branches:
# - main
paths:
- 'src/**'
- 'tests/**'
- '.github/workflows/lint-and-type-check.yml'
pull_request:
# branches:
# - main
paths:
- 'src/**'
- 'tests/**'
- '.github/workflows/lint-and-type-check.yml'
workflow_dispatch:

defaults:
run:
shell: bash

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install uv
id: setup-uv
uses: astral-sh/setup-uv@v5
with:
python-version: "3.11"

- name: Install the project
run: uv sync --locked

- name: Run mypy
run: uv run mypy .

- name: Run ruff lint
run: uv run ruff check .

- name: Run ruff format
run: uv run ruff format --check .

0 comments on commit be7d122

Please sign in to comment.