Files
continuwuity/.forgejo/workflows/prek-checks.yml
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

84 lines
1.8 KiB
YAML
Raw Normal View History

2025-08-17 15:11:38 +01:00
name: Checks / Prek
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
2025-08-17 15:11:38 +01:00
2025-06-21 18:20:04 +01:00
permissions:
contents: read
jobs:
2025-08-17 15:11:38 +01:00
fast-checks:
name: Pre-commit & Formatting
runs-on: ubuntu-latest
steps:
2025-08-17 15:11:38 +01:00
- name: Checkout repository
2025-11-25 12:38:05 -05:00
uses: actions/checkout@v6
2025-08-17 15:11:38 +01:00
with:
persist-credentials: false
- name: Setup Rust nightly
uses: ./.forgejo/actions/setup-rust
2025-08-17 15:11:38 +01:00
with:
rust-version: nightly
github-token: ${{ secrets.GH_PUBLIC_RO }}
2025-08-17 15:11:38 +01:00
- name: Run prek
run: |
prek run \
2025-08-17 15:11:38 +01:00
--all-files \
--hook-stage manual \
--show-diff-on-failure \
--color=always \
-v
- name: Check Rust formatting
run: |
cargo +nightly fmt --all -- --check && \
echo "✅ Formatting check passed" || \
exit 1
clippy-and-tests:
name: Clippy and Cargo Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
2025-11-25 12:38:05 -05:00
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Setup LLVM
uses: ./.forgejo/actions/setup-llvm-with-apt
with:
extra-packages: liburing-dev liburing2
- name: Setup Rust with caching
uses: ./.forgejo/actions/setup-rust
with:
github-token: ${{ secrets.GH_PUBLIC_RO }}
- name: Run Clippy lints
run: |
cargo clippy \
--workspace \
--features full \
--locked \
--no-deps \
--profile test \
-- \
-D warnings
- name: Run Cargo tests
run: |
cargo test \
--workspace \
--features full \
--locked \
--profile test \
--all-targets \
--no-fail-fast