mirror of
https://github.com/wger-project/wger.git
synced 2026-11-29 09:41:02 +01:00
38 lines
818 B
YAML
38 lines
818 B
YAML
name: Ruff
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [ master, ]
|
|
paths:
|
|
- '**.py'
|
|
- 'pyproject.toml'
|
|
- '.github/workflows/ruff.yml'
|
|
|
|
jobs:
|
|
ruff-job:
|
|
name: Lint and format check
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v7
|
|
with:
|
|
enable-cache: true
|
|
|
|
# local development environment.
|
|
- name: Install dependencies
|
|
run: uv sync --only-group dev
|
|
|
|
# --output-format=github reports the violations as annotations in the diff
|
|
- name: Lint the code
|
|
run: uv run ruff check --output-format=github
|
|
|
|
- name: Check the formatting
|
|
run: uv run ruff format --check
|