added infrastructure code
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
name: Code Quality Pipeline
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
code-quality:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ inputs.python-version }}
|
||||
|
||||
- name: Install uv
|
||||
run: pip install uv
|
||||
|
||||
- name: Install dependencies
|
||||
env:
|
||||
UV_LINK_MODE: copy
|
||||
run: uv sync --all-extras
|
||||
|
||||
- name: Type check with mypy
|
||||
run: uv run mypy .
|
||||
|
||||
- name: Ruff lint
|
||||
run: uv run ruff check .
|
||||
|
||||
- name: Ruff format
|
||||
run: uv run ruff format --check .
|
||||
|
||||
- name: Pyupgrade check
|
||||
run: uv run pyupgrade --py312-plus $(git ls-files '*.py') && git diff --exit-code
|
||||
|
||||
- name: Prettier format
|
||||
run: |
|
||||
uv run prettier --check .
|
||||
Reference in New Issue
Block a user