45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
name: CI
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
push:
|
|
branches:
|
|
- "**"
|
|
tags: [ "v*" ]
|
|
permissions:
|
|
contents: read
|
|
pull-requests: read
|
|
concurrency:
|
|
group: ci-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
jobs:
|
|
prek:
|
|
name: Lint, format & test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
# Toolchain version + components come from rust-toolchain.toml. rustflags is
|
|
# cleared so plain builds don't fail on warnings; the clippy hook still does.
|
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
with:
|
|
rustflags: ''
|
|
|
|
- name: Install SQLite3
|
|
run: sudo apt-get update && sudo apt-get install -y libsqlite3-dev
|
|
|
|
# just drives the prek recipes; mise provides the pinned prek (mise.toml).
|
|
- uses: taiki-e/install-action@v2
|
|
with:
|
|
tool: just
|
|
- uses: jdx/mise-action@v2
|
|
|
|
# Run the same prek hooks devs run locally; .pre-commit-config.yaml is the
|
|
# source of truth. Tests are a separate step for visible timing.
|
|
- name: Lint & format (prek hooks, excluding tests)
|
|
run: just prek-run-on-all --skip test-unit
|
|
|
|
- name: Unit tests
|
|
run: just test
|