Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ci: use prek instead of pre-commit in validation workflow
- Install prek and add to PATH
- Cache prek environments
- Run prek run --all-files instead of uv run pre-commit run

Fix missing pre-commit binary error in CI.
  • Loading branch information
kh3rld committed Sep 22, 2025
commit 8a11e521abd2f913a410b3295c883e9d822efdd9
17 changes: 11 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,20 @@ jobs:
uv sync --all-extras --dev
shell: bash

- name: Load Cached Pre-Commit Dependencies
id: cached-pre-commit-dependencies
- name: Install prek
run: |
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/download/v0.2.1/prek-installer.sh | sh
Comment thread
kh3rld marked this conversation as resolved.
Outdated
echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Load Cached Prek Dependencies
id: cached-prek-dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit/
key: pre-commit|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
path: ~/.cache/prek/
key: prek|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}

- name: Execute Pre-Commit
run: uv run pre-commit run --show-diff-on-failure --color=always --all-files
- name: Execute Prek
run: prek run --show-diff-on-failure --color=always --all-files

coverage:
needs: validate
Expand Down
10 changes: 5 additions & 5 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ Thank you for contributing to Kreuzberg!
uv sync --all-extras --dev
```

1. **Install pre-commit hooks**:
1. **Install prek hooks**:

```bash
pre-commit install && pre-commit install --hook-type commit-msg
prek install && prek install --hook-type commit-msg
```

## Development
Expand All @@ -42,8 +42,8 @@ uv run ruff check # Lint
uv run ruff check --fix # Auto-fix issues
uv run mypy # Type check

# Pre-commit
uv run pre-commit run --all-files # Run all checks manually
# Prek
prek run --all-files # Run all checks manually

# Documentation
uv run mkdocs serve # Serve docs locally
Expand All @@ -70,7 +70,7 @@ Use [Conventional Commits](https://www.conventionalcommits.org/):

- Python 3.10-3.13 supported
- System dependencies (optional): Tesseract, Pandoc
- Pre-commit runs automatically on commit
- Prek runs automatically on commit
- Join our [Discord](https://discord.gg/pXxagNK2zN) for help

## License
Expand Down