Skip to content

feat(orchestrator): add external agent container to test topology #193

feat(orchestrator): add external agent container to test topology

feat(orchestrator): add external agent container to test topology #193

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
build:
name: Build & Vet
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version: "stable"
- name: Build harness CLI
run: make build
- name: Go vet
run: go vet ./...
- name: Go test
run: go test ./...
- name: Receiver module tests
run: cd containers/receiver && go test ./...
- name: Verifier module tests
run: cd containers/verifier && go test ./...
- name: Build generator module
run: cd containers/generator && go build ./...
- name: Build receiver module
run: cd containers/receiver && go build ./...
- name: Build collector module
run: cd containers/collector && go build ./...
- name: Build verifier module
run: cd containers/verifier && go build ./...
containers:
name: Build & Publish Container Images
runs-on: ubuntu-latest
# Run after build succeeds. Only push images on commits to main —
# PR builds verify the Dockerfiles parse but don't pollute Docker Hub.
needs: build
steps:
- uses: actions/checkout@v5
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
# Skip login on PR builds — secrets aren't available there and we
# don't push anyway.
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# PR builds: just confirm each Dockerfile builds.
- name: Build generator image
if: github.event_name == 'pull_request'
run: make build-generator
- name: Build receiver image
if: github.event_name == 'pull_request'
run: make build-receiver
- name: Build collector image
if: github.event_name == 'pull_request'
run: make build-collector
- name: Build verifier image
if: github.event_name == 'pull_request'
run: make build-verifier
# Main branch: build + tag with both :latest and :sha-<commit>, then push.
- name: Build & push generator image
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: make push-generator ATTEST=1
- name: Build & push receiver image
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: make push-receiver ATTEST=1
- name: Build & push collector image
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: make push-collector ATTEST=1
- name: Build & push verifier image
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: make push-verifier ATTEST=1
emulator-smoke:
name: Emulator Smoke (LocalStack + Azurite)
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version: "stable"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build harness + container images
run: make build build-containers
# Two short end-to-end cases against the cloud emulators. Vector is
# the subject: its image is public and its endpoint overrides are the
# best documented, so this exercises the harness's emulator topology
# (compose wiring, init, polling receiver) without private images.
- name: S3 correctness (LocalStack)
run: bin/harness test -t tcp_to_s3_correctness -s vector
- name: Azure Blob correctness (Azurite)
run: bin/harness test -t tcp_to_azure_blob_correctness -s vector