Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .claude/skills/sdk-go/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ Every identifier in a code block exists; the quickstart is the example file verb
is copied. While 0.x, a minor may break a signature; a patch only fixes.

1. Land the change on `main` by a pull request, with the `CHANGELOG.md` entry. The `Go SDK`
workflow (`.github/workflows/sdk-go.yml`) checks `sdks/go` alone on Go 1.25, as a consumer
gets it.
steps of the `CI (SDKs)` workflow (`.github/workflows/ci-sdks.yml`) check `sdks/go` alone
on Go 1.25, as a consumer gets it.
2. Check out the commit to tag (`git switch --detach <the main commit>`), run the smoke set
from `sdks/go` with `E2E_REQUIRED=1`, as above, and keep its output, so the result is the
tagged commit's.
Expand Down
172 changes: 172 additions & 0 deletions .github/workflows/ci-go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
name: CI (Go)
# The router, the Go SDK, the terminal UI and the load benchmark, tied together by go.work.
# Feature branches run through pull_request; a push of the same commit would be a second,
# uncancellable copy of every job. A push to main runs it on the same paths as a pull request.
# A pull request that changes none of them never starts this workflow, so its check must not
# be made required: it would wait forever on such a pull request.
on:
push:
branches: [ "main" ]
paths:
- 'acceleration/**'
- 'sdks/go/**'
- 'tui/**'
- 'performance_benchmark/**'
# The example modules go.work uses: their requirements take part in the workspace's
# version selection, so they change what the router, SDK and TUI build against.
- 'examples/routers/chorus_asr_example/go.mod'
- 'examples/routers/chorus_asr_example/go.sum'
- 'examples/routers/stt_realtime_example/go.mod'
- 'examples/routers/stt_realtime_example/go.sum'
- 'examples/voice_agents/swift_assistant/backend/go.mod'
- 'examples/voice_agents/swift_assistant/backend/go.sum'
- 'examples/voice_agents/swift_assistant/configure/go.mod'
- 'examples/voice_agents/swift_assistant/configure/go.sum'
- 'examples/voice_agents/swift_demo/backend/go.mod'
- 'examples/voice_agents/swift_demo/backend/go.sum'
- 'examples/voice_agents/swift_demo/configure/go.mod'
- 'examples/voice_agents/swift_demo/configure/go.sum'
- 'go.work'
- 'go.work.sum'
- '.github/workflows/ci-go.yml'
- '!**/*.md'
pull_request:
branches: [ "**" ]
paths:
- 'acceleration/**'
- 'sdks/go/**'
- 'tui/**'
- 'performance_benchmark/**'
# The example modules go.work uses: their requirements take part in the workspace's
# version selection, so they change what the router, SDK and TUI build against.
- 'examples/routers/chorus_asr_example/go.mod'
- 'examples/routers/chorus_asr_example/go.sum'
- 'examples/routers/stt_realtime_example/go.mod'
- 'examples/routers/stt_realtime_example/go.sum'
- 'examples/voice_agents/swift_assistant/backend/go.mod'
- 'examples/voice_agents/swift_assistant/backend/go.sum'
- 'examples/voice_agents/swift_assistant/configure/go.mod'
- 'examples/voice_agents/swift_assistant/configure/go.sum'
- 'examples/voice_agents/swift_demo/backend/go.mod'
- 'examples/voice_agents/swift_demo/backend/go.sum'
- 'examples/voice_agents/swift_demo/configure/go.mod'
- 'examples/voice_agents/swift_demo/configure/go.sum'
- 'go.work'
- 'go.work.sum'
- '.github/workflows/ci-go.yml'
- '!**/*.md'

permissions:
contents: read
pull-requests: read

# Cancel in-flight runs for the same branch/PR when new commits arrive
concurrency:
group: ci-go-${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true

jobs:
go:
runs-on: ubuntu-latest
# Every backend test that needs Redis skips without ROUTER_REDIS_ADDR: the service gives
# them one, on a host port the runner picks so a port already held on the runner cannot
# fail the job. The health check holds the steps until it answers PING.
services:
redis:
image: redis:7-alpine
ports:
- 6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 5s
--health-timeout 3s
--health-retries 10
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version-file: acceleration/go.mod
cache-dependency-path: |
acceleration/go.sum
sdks/go/go.sum
tui/go.sum
performance_benchmark/go.sum
examples/routers/chorus_asr_example/go.sum
examples/routers/stt_realtime_example/go.sum
examples/voice_agents/swift_assistant/backend/go.sum
examples/voice_agents/swift_assistant/configure/go.sum
examples/voice_agents/swift_demo/backend/go.sum
examples/voice_agents/swift_demo/configure/go.sum

# The spec is rendered from the server's Go operations and the clients are generated
# from the spec, so any of them left behind has already drifted from the others.
- name: Check the generated code is in step with the spec
run: |
(cd acceleration && go run ./cmd/openapi)
(cd sdks/go && go generate ./...)
git diff --exit-code -- acceleration/api/openapi.yaml sdks/go/acceleration/generated.go

# internal/video samples clips with ffmpeg and ffprobe, and its tests skip without them.
- name: Install ffmpeg
run: sudo apt-get update -qq && sudo apt-get install -y -qq ffmpeg

# The backend is built with Go's SIMD experiment, as acceleration/Dockerfile builds it.
- name: Vet the backend
run: go vet ./...
working-directory: acceleration
env:
GOEXPERIMENT: simd

- name: Test the backend
run: go test ./...
working-directory: acceleration
env:
GOEXPERIMENT: simd
ROUTER_REDIS_ADDR: localhost:${{ job.services.redis.ports['6379'] }}

# Without the experiment the Opus codec runs its scalar code, which must still build
# and pass.
- name: Test the audio without SIMD
run: go build ./... && go test ./internal/audio/... ./internal/audiofloor/... ./internal/agent/streamedge/...
working-directory: acceleration

- name: Vet phonecheck
run: go vet ./...
working-directory: acceleration/cmd/phonecheck

- name: Test phonecheck
run: go test -race ./...
working-directory: acceleration/cmd/phonecheck

- name: Compile STS integration tests
run: go test -tags integration -run '^$' -exec=true ./internal/sts/...
working-directory: acceleration
env:
GOEXPERIMENT: simd

- name: Vet the SDK
run: go vet ./...
working-directory: sdks/go

- name: Test the SDK
run: go test -race ./...
working-directory: sdks/go

- name: Vet the terminal UI
run: go vet ./...
working-directory: tui

- name: Test the terminal UI
run: go test -race ./...
working-directory: tui

# Without the webrtc tag the load benchmark builds its transport as a stub, so its
# ramp, report and audio checks are tested here without live calls.
- name: Vet the load benchmark
run: go vet ./...
working-directory: performance_benchmark

- name: Test the load benchmark
run: go test ./...
working-directory: performance_benchmark
60 changes: 60 additions & 0 deletions .github/workflows/ci-python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: CI (Python)
# Ruff lints every .py in the repository, examples included, and the stream plugin's client is
# generated from the spec, so both are among the paths.
# Feature branches run through pull_request; a push of the same commit would be a second,
# uncancellable copy of every job. A push to main runs it on the same paths as a pull request.
# A pull request that changes none of them never starts this workflow, so its check must not
# be made required: it would wait forever on such a pull request.
on:
push:
branches: [ "main" ]
paths:
- '**/*.py'
- '**/pyproject.toml'
- 'uv.lock'
- 'pytest.ini'
- 'sdks/python/**'
- 'plugins/**'
- 'tests/**'
- 'acceleration/api/openapi.yaml'
- '.github/workflows/run_tests.yml'
- '.github/actions/python-uv-setup/**'
- '.github/workflows/ci-python.yml'
- '!**/*.md'
# The example plugins/stream/tests/test_folder.py loads, instructions.md included, so it
# must stay after the *.md exclusion.
- 'examples/text_agents/mcp_plugins/**'
pull_request:
branches: [ "**" ]
paths:
- '**/*.py'
- '**/pyproject.toml'
- 'uv.lock'
- 'pytest.ini'
- 'sdks/python/**'
- 'plugins/**'
- 'tests/**'
- 'acceleration/api/openapi.yaml'
- '.github/workflows/run_tests.yml'
- '.github/actions/python-uv-setup/**'
- '.github/workflows/ci-python.yml'
- '!**/*.md'
# The example plugins/stream/tests/test_folder.py loads, instructions.md included, so it
# must stay after the *.md exclusion.
- 'examples/text_agents/mcp_plugins/**'

permissions:
contents: read
pull-requests: read

# Cancel in-flight runs for the same branch/PR when new commits arrive
concurrency:
group: ci-python-${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true

jobs:
# No secrets: unit tests reach no provider, and a pull request's code runs here.
unit:
uses: ./.github/workflows/run_tests.yml
with:
marker: 'not integration'
Loading
Loading