-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (54 loc) · 1.82 KB
/
Copy pathci.yml
File metadata and controls
67 lines (54 loc) · 1.82 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
56
57
58
59
60
61
62
63
64
65
66
67
# CI for the agentctl workspace.
#
# Runs on every PR and on pushes to main. Two jobs:
# build-test — fmt + clippy (-D warnings) + tests + CRD drift gate.
# helm — lint and render the agentctl chart.
# Release/publish lives in release.yml (tag-driven).
name: ci
on:
push:
branches: [main]
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
build-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
# protoc for the scaler's tonic-build (gRPC codegen) — the workspace build
# (clippy/test) compiles agentctl-scaler, whose build script needs protoc.
- name: Install protoc
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
- name: rustfmt
run: cargo fmt --all -- --check
- name: clippy
run: cargo clippy --workspace --all-targets -- -D warnings
- name: test
run: cargo test --workspace
- name: CRD drift (deploy/crds is generated)
run: |
cargo run -p agentctl-crdgen
git diff --exit-code deploy/crds/ \
|| { echo "::error::deploy/crds is stale — run 'cargo run -p agentctl-crdgen'"; exit 1; }
helm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: azure/setup-helm@v4
- name: helm lint
run: helm lint charts/agentctl
- name: helm template
run: helm template agentctl charts/agentctl >/dev/null
supply-chain:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/install-action@cargo-deny
- name: cargo deny
run: cargo deny check advisories bans licenses sources