-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (41 loc) · 1.42 KB
/
Copy pathci.yml
File metadata and controls
53 lines (41 loc) · 1.42 KB
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
name: CI
# Build, lint, and test gate for the whole workspace on a clean runner.
# The Dockerfile proves the rustyred-server binary builds; this proves every
# crate compiles, lints stay clean under -D warnings, formatting is enforced,
# and the test suite passes. protobuf-compiler is required because
# crates/rustyred-server/build.rs compiles vendor/proto via tonic-build.
# The vendored proto is in-tree, so no submodule checkout is needed.
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
build-test:
name: fmt + clippy + test
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Install protobuf-compiler
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends protobuf-compiler
- name: Install Rust toolchain (stable + rustfmt + clippy)
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Cache cargo registry and build artifacts
uses: Swatinem/rust-cache@v2
- name: Format check
run: cargo fmt --all -- --check
- name: Clippy (deny warnings)
run: cargo clippy --workspace --all-targets --locked -- -D warnings
- name: Test
run: cargo test --workspace --locked