ci: leave the agent integration job out for now
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 15m42s
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 15m42s
Mongo as a service container goes away during the e2e binary, also run serially: in a memory-capped container mongod sizes its WiredTiger cache from the host's RAM unless --wiredTigerCacheSizeGB is set. Running these tests in CI is its own follow-up (backlog); this PR keeps the test and cascade fixes, all 21 green against a local MongoDB. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KYcAAeTw22GE9QPzDM8yc4
This commit is contained in:
1 parent
c34bfd8f92
commit
721b0df7fc
1 file changed
-76
@@ -151,82 +151,6 @@ jobs:
|
||||
run: sccache --show-stats
|
||||
if: always()
|
||||
|
||||
# The agent's integration tests against a real MongoDB (as the nightly). Its
|
||||
# own job: as the last step of the long check job the mongo service had
|
||||
# gone by the time the tests ran (server selection timeout, container
|
||||
# already removed). Without one in CI they had rotted unnoticed since the
|
||||
# M7.2 tenant split.
|
||||
agent-integration:
|
||||
name: Agent integration
|
||||
if: github.event_name == 'pull_request'
|
||||
runs-on: docker
|
||||
container:
|
||||
image: rust:1.94-bookworm
|
||||
services:
|
||||
mongo:
|
||||
image: mongo:7
|
||||
env:
|
||||
MONGO_INITDB_ROOT_USERNAME: root
|
||||
MONGO_INITDB_ROOT_PASSWORD: example
|
||||
steps:
|
||||
- name: Checkout
|
||||
run: |
|
||||
git init
|
||||
git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git"
|
||||
git fetch --depth=1 origin "${GITHUB_SHA}"
|
||||
git checkout FETCH_HEAD
|
||||
# Resolve crates.io deps through the self-hosted Kellnr mirror (cached,
|
||||
# crates.io-independent). Git deps (firmwerk-core) are unaffected — source
|
||||
# replacement only applies to crates.io-sourced crates.
|
||||
- name: Use Kellnr crates.io mirror
|
||||
run: |
|
||||
: "${CARGO_HOME:=/usr/local/cargo}"
|
||||
mkdir -p "$CARGO_HOME"
|
||||
{
|
||||
echo '[source.crates-io]'
|
||||
echo 'replace-with = "kellnr"'
|
||||
echo '[registries.kellnr]'
|
||||
echo 'index = "sparse+https://crates.breakpilot.com/api/v1/cratesio/"'
|
||||
} >> "$CARGO_HOME/config.toml"
|
||||
env:
|
||||
RUSTC_WRAPPER: ""
|
||||
- name: Install sccache
|
||||
run: |
|
||||
curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-x86_64-unknown-linux-musl.tar.gz \
|
||||
| tar xz --strip-components=1 -C /usr/local/bin/ sccache-v0.10.0-x86_64-unknown-linux-musl/sccache
|
||||
chmod +x /usr/local/bin/sccache
|
||||
env:
|
||||
RUSTC_WRAPPER: ""
|
||||
|
||||
# compliance-agent has a git dependency on firmwerk-core (a private repo on
|
||||
# this Gitea instance). Rewrite its SSH URL to HTTPS + a PAT so the runner
|
||||
# can fetch it. Uses the org secret PLATFORM_CI_TOKEN (bot `platform-ci`,
|
||||
# read-only member of the platform org).
|
||||
# (Honored on fetch because CARGO_NET_GIT_FETCH_WITH_CLI=true uses system git.)
|
||||
- name: Configure git auth for the private firmwerk dependency
|
||||
run: |
|
||||
git config --global \
|
||||
url."https://platform-ci:${{ secrets.PLATFORM_CI_TOKEN }}@git.breakpilot.com/".insteadOf \
|
||||
"ssh://git@git.breakpilot.com:22222/"
|
||||
env:
|
||||
RUSTC_WRAPPER: ""
|
||||
|
||||
- name: Wait for MongoDB
|
||||
run: |
|
||||
for i in $(seq 1 60); do
|
||||
if (exec 3<>/dev/tcp/mongo/27017) 2>/dev/null; then echo "mongo:27017 is up"; exit 0; fi
|
||||
sleep 2
|
||||
done
|
||||
echo "::error::mongo:27017 not reachable after 120 s"; getent hosts mongo || echo "mongo does not resolve"; exit 1
|
||||
shell: bash
|
||||
# One test at a time: each test opens its own database, and 21 at once
|
||||
# took mongo down mid-run (its cache is sized from the host's RAM, the
|
||||
# job's memory is capped). Serial, the e2e binary takes about 10 s.
|
||||
- name: Tests (agent integration)
|
||||
run: cargo test -p compliance-agent --test '*' -- --test-threads=1
|
||||
env:
|
||||
TEST_MONGODB_URI: mongodb://root:example@mongo:27017/?authSource=admin
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Stage 2: Deploy (only on main, after checks pass)
|
||||
# Each service only deploys when its relevant files changed.
|
||||
|
||||
Reference in new issue
Block a user