1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: CI
on:
push:
branches:
pull_request:
branches:
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
build-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
# nornir is a single crate with feature gates. CI builds the default
# (`server`) feature set — `--features cli` additionally pulls the typst
# docs-export stack, exercised separately by the docs workflow.
- name: Build
run: cargo build --workspace --verbose
- name: Test
run: cargo test --workspace --verbose
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
# Informational: the crate is not fully fmt/clippy-clean yet, so these do
# not fail the build (no `-D warnings`).
- name: Clippy
run: cargo clippy --workspace --all-targets
continue-on-error: true
- name: Rustfmt
run: cargo fmt --all -- --check
continue-on-error: true