mirror of
https://github.com/joshuadavidthomas/django-language-server.git
synced 2025-09-08 03:10:34 +00:00
44 lines
879 B
YAML
44 lines
879 B
YAML
name: lint
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [main]
|
|
workflow_call:
|
|
|
|
concurrency:
|
|
group: lint-${{ github.head_ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
FORCE_COLOR: "1"
|
|
PYTHONUNBUFFERED: "1"
|
|
|
|
jobs:
|
|
pre-commit:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v5
|
|
with:
|
|
enable-cache: true
|
|
pyproject-file: pyproject.toml
|
|
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: ~/.cache/pre-commit/
|
|
key: pre-commit-1|${{ hashFiles('.pre-commit-config.yaml') }}
|
|
|
|
- name: pre-commit
|
|
run: |
|
|
SKIP=no-commit-to-branch \
|
|
uv run --with pre-commit-uv pre-commit run \
|
|
--all-files \
|
|
--show-diff-on-failure \
|
|
--color always
|