Skip to content

Replace simple-git-hooks with pre-commit for unified workflow #3

Replace simple-git-hooks with pre-commit for unified workflow

Replace simple-git-hooks with pre-commit for unified workflow #3

Workflow file for this run

name: Pre-commit
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
workflow_dispatch: {}
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
override: true
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: Set up Bun
uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: bun install
- name: Install pre-commit
run: |
pip install pre-commit
pre-commit install -f
pre-commit install --hook-type commit-msg
- name: Run pre-commit on all files
run: pre-commit run --all-files