Format code #555
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Style Checks | |
on: | |
push: | |
branches: | |
- development | |
- main | |
paths: | |
- "Tekst-API/tekst/**" | |
- "Tekst-API/tests/**" | |
- "Tekst-API/pyproject.toml" | |
- "Tekst-API/uv.lock" | |
- ".github/workflows/server-style.yml" | |
pull_request: | |
branches: | |
- development | |
paths: | |
- "Tekst-API/tekst/**" | |
- "Tekst-API/tests/**" | |
- "Tekst-API/pyproject.toml" | |
- "Tekst-API/uv.lock" | |
- ".github/workflows/server-style.yml" | |
workflow_dispatch: | |
jobs: | |
checks: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./Tekst-API | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
version: "0.5.7" | |
enable-cache: true | |
cache-dependency-glob: "./Tekst-API/uv.lock" | |
- name: Install Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version-file: "./Tekst-API/pyproject.toml" | |
- name: Install dependencies | |
run: uv sync | |
- name: Cancel on setup error | |
if: failure() | |
uses: andymckay/[email protected] | |
- name: Lint code base | |
if: always() | |
run: uv run ruff check . --extend-select N | |
- name: Check code formatting | |
if: always() | |
run: uv run ruff format . --check |