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
name: CI
on:
push:
branches:
pull_request:
branches:
jobs:
build-and-test:
# Pinned, not `ubuntu-latest`. That label became Ubuntu 26 on 2026-10-19,
# and a runner image changing under a green CI is the kind of surprise
# that gets diagnosed as a code regression. Moving up is now a commit
# somebody makes on purpose.
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- name: Install stable Rust
run: |
rustup toolchain install stable --profile minimal --component rustfmt,clippy
rustup default stable
rustc --version && cargo --version
# Formatting and lints run before the build, because they fail in
# seconds and the build does not.
- name: Format
run: cargo fmt --check
- name: Clippy
run: cargo clippy --locked -- -D warnings
- name: Build
run: cargo build --locked
- name: Test
run: cargo test --locked