Files
narl-workspace/.github/workflows/ci.yml
T
nvrl a59ba4af1b build: a clone compiles before the frontend is built
rust-embed refused to derive without `web/dist`, so on a fresh clone
`cargo check`, `cargo test` and rust-analyzer failed with a derive error that
did not say what was missing. With `allow_missing` the embed is empty until
the frontend is built, and the handler gives the answer it already had for
that case, "frontend not built". The release build is unchanged once
`web/dist` is there, which `make build`, the Dockerfile and CI all see to.
2026-10-21 12:35:59 +02:00

52 lines
1.2 KiB
YAML

# What `make check` runs, on every push and pull request.
name: ci
on:
push:
pull_request:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
# Built first so the binary under test embeds the app it ships with.
- name: frontend
working-directory: web
run: |
bun install --frozen-lockfile
bun run build
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --check
- run: cargo clippy --all-targets --locked -- -D warnings
- run: cargo test --locked
web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- working-directory: web
run: |
bun install --frozen-lockfile
bun run check
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
# Fails when a generated page is stale or a link between pages leads nowhere.
- run: bun scripts/wiki.ts --check