Skip to content

Commit 6d19ad8

Browse files
ci: add github branch CI workflow and integration tests for acp-nats and trogon-nats
- Add .github/workflows/ci-github-branch.yml: lint, unit tests, and integration tests (trogon-nats, acp-nats, trogon-github) on push/PR to github branch - Add integration test suite for trogon-nats (nats_integration.rs) - Add integration test suite for acp-nats Bridge (bridge_integration.rs) - Add testcontainers and related dev-dependencies to acp-nats and trogon-nats Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 49e8767 commit 6d19ad8

5 files changed

Lines changed: 840 additions & 1 deletion

File tree

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: CI — github branch
2+
3+
on:
4+
push:
5+
branches: [github]
6+
pull_request:
7+
branches: [github]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
unit-tests:
14+
name: Lint + Unit tests
15+
runs-on: ubuntu-latest
16+
defaults:
17+
run:
18+
working-directory: rsworkspace
19+
20+
steps:
21+
- uses: actions/checkout@v4.3.1
22+
23+
- name: Install Rust components
24+
run: rustup component add rustfmt clippy
25+
26+
- name: Cache dependencies
27+
uses: Swatinem/rust-cache@v2.8.2
28+
with:
29+
workspaces: rsworkspace -> target
30+
31+
- name: Check formatting
32+
run: cargo fmt --all -- --check
33+
34+
- name: Clippy
35+
run: cargo clippy --all-targets --all-features
36+
37+
- name: Unit tests
38+
run: cargo test --workspace --lib
39+
40+
integration-tests:
41+
name: Integration tests (Docker)
42+
runs-on: ubuntu-latest
43+
defaults:
44+
run:
45+
working-directory: rsworkspace
46+
47+
steps:
48+
- uses: actions/checkout@v4.3.1
49+
50+
- name: Cache dependencies
51+
uses: Swatinem/rust-cache@v2.8.2
52+
with:
53+
workspaces: rsworkspace -> target
54+
55+
- name: Integration — trogon-nats
56+
run: cargo test -p trogon-nats --test nats_integration
57+
58+
- name: Integration — acp-nats (Bridge)
59+
run: cargo test -p acp-nats --test bridge_integration
60+
61+
- name: Integration — trogon-github (webhook e2e)
62+
run: cargo test -p trogon-github --test webhook_e2e

rsworkspace/crates/acp-nats/Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ trogon-nats = { path = "../trogon-nats" }
2020
trogon-std = { path = "../trogon-std" }
2121

2222
[dev-dependencies]
23+
agent-client-protocol = "0.9.4"
24+
futures-util = "0.3"
25+
opentelemetry = "0.31.0"
2326
opentelemetry_sdk = { version = "0.31.0", features = ["rt-tokio", "metrics", "testing"] }
27+
testcontainers-modules = { version = "0.8", features = ["nats"] }
28+
tokio = { version = "1.49.0", features = ["full"] }
2429
trogon-nats = { path = "../trogon-nats", features = ["test-support"] }
2530
trogon-std = { path = "../trogon-std", features = ["test-support"] }

0 commit comments

Comments
 (0)