-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (52 loc) · 1.49 KB
/
Copy pathrust.yml
File metadata and controls
55 lines (52 loc) · 1.49 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
54
55
# Rust CI for the workspace (at the repo root post-2.0-flip).
# Phase 0 deliverable: "CI from day one — fmt, clippy -D warnings, test,
# sqlx prepare check" (phases/2.0/03-PHASES.md). The sqlx-prepare job is added
# in Phase 0 once bss-db lands; for now we gate fmt + clippy + test.
name: rust
on:
push:
branches: ["main", "2.0"]
paths:
- "crates/**"
- "services/**"
- "portals/**"
- "cli/**"
- "conformance/**"
- "migrations/**"
- "Cargo.toml"
- "Cargo.lock"
- "rust-toolchain.toml"
- ".github/workflows/rust.yml"
pull_request:
paths:
- "crates/**"
- "services/**"
- "portals/**"
- "cli/**"
- "conformance/**"
- "migrations/**"
- "Cargo.toml"
- "Cargo.lock"
- "rust-toolchain.toml"
- ".github/workflows/rust.yml"
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-D warnings"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install toolchain (stable + rustfmt + clippy)
run: |
rustup toolchain install stable --profile minimal --component rustfmt --component clippy
rustup default stable
- uses: Swatinem/rust-cache@v2
- name: fmt
run: cargo fmt --all --check
- name: clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: test
run: cargo test --all-features
- name: doctrine-check
run: bash scripts/rust_doctrine_check.sh