@@ -132,16 +132,26 @@ jobs:
132132 working-directory : sink/slog
133133 run : go run "$GOLANGCI_LINT" run --config "$GITHUB_WORKSPACE/.golangci.yml" ./...
134134
135- # The race-test matrix lives in a reusable workflow so its legs render as a
136- # single collapsible tree in the checks UI ("tests / test (1.25.11, …)") rather
137- # than as flat top-level checks. Keep the module list in sync with the lint,
138- # vuln, and coverage jobs below.
135+ # The state-machine race-test matrix lives in a reusable workflow so its legs
136+ # render as a single collapsible "state machine tests / …" tree in the checks
137+ # UI rather than as flat top-level checks. The sink-domain legs live in their
138+ # own "sink" tree (see the `sink` job below). Keep this module list in sync
139+ # with the lint, vuln, and coverage jobs below.
139140 tests :
141+ name : state machine tests
140142 needs : changes
141143 if : needs.changes.outputs.code == 'true'
142144 uses : ./.github/workflows/test.yml
143145 with :
144- modules : " state state/expr durable cluster transport wasm e2e examples/fooddelivery examples/dispatch telemetry telemetry/slog telemetry/otel telemetry/datadog sink sink/bridge sink/file sink/http sink/prometheus sink/slog"
146+ modules : " state state/expr durable cluster transport wasm e2e examples/fooddelivery examples/dispatch telemetry telemetry/slog telemetry/otel telemetry/datadog"
147+
148+ # Every sink-domain check (in-workspace race tests, the SDK-backed destination
149+ # matrix, and the integration leg) groups under a single collapsible "sink / …"
150+ # tree via this reusable workflow.
151+ sink :
152+ needs : changes
153+ if : needs.changes.outputs.code == 'true'
154+ uses : ./.github/workflows/sink.yml
145155
146156 vuln :
147157 needs : changes
@@ -532,115 +542,6 @@ jobs:
532542 - name : Build site
533543 run : npm run build
534544
535- # The SDK-backed sink destinations are standalone modules kept out of the
536- # workspace (see go.work / the magefile), so they build with GOWORK=off via
537- # their own replace directives. Each is one matrix leg across the OS matrix for
538- # race tests; lint, vuln, and the coverage gate run on Linux. This keeps the
539- # vendor SDKs out of the core modules' dependency graphs.
540- sink-destinations :
541- needs : changes
542- if : needs.changes.outputs.code == 'true'
543- strategy :
544- fail-fast : false
545- matrix :
546- os : [ubuntu-latest, macos-latest, windows-latest]
547- module :
548- - sink/cloudwatch
549- - sink/dynamo
550- - sink/eventbridge
551- - sink/firehose
552- - sink/gcppubsub
553- - sink/kafka
554- - sink/kinesis
555- - sink/nats
556- - sink/otel
557- - sink/redis
558- - sink/s3
559- - sink/sns
560- - sink/sql
561- - sink/sqs
562- - sink/statsd
563- - sink/timestream
564- - examples/sinkflow
565- runs-on : ${{ matrix.os }}
566- env :
567- GOWORK : " off"
568- THRESHOLD : " 80"
569- steps :
570- - uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
571- - uses : actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
572- with :
573- go-version : " 1.26.4"
574- cache-dependency-path : " **/go.sum"
575- - name : test -race
576- shell : bash
577- run : go test -C "${{ matrix.module }}" -race ./...
578- - name : golangci-lint
579- if : matrix.os == 'ubuntu-latest'
580- shell : bash
581- run : go -C "${{ matrix.module }}" run "$GOLANGCI_LINT" run --config "$GITHUB_WORKSPACE/.golangci.yml" ./...
582- - name : govulncheck
583- if : matrix.os == 'ubuntu-latest'
584- shell : bash
585- run : go -C "${{ matrix.module }}" run "$GOVULNCHECK" ./...
586- - name : coverage gate
587- if : matrix.os == 'ubuntu-latest'
588- shell : bash
589- run : |
590- go test -C "${{ matrix.module }}" -covermode=atomic -coverprofile=coverage.out ./...
591- pct=$(go -C "${{ matrix.module }}" tool cover -func=coverage.out | awk '/^total:/ {sub(/%/,"",$3); print $3}')
592- echo "total coverage: ${pct}% (threshold ${THRESHOLD}%)"
593- awk -v p="$pct" -v t="$THRESHOLD" 'BEGIN { exit (p+0 < t+0) ? 1 : 0 }' \
594- || { echo "::error::coverage ${pct}% is below the ${THRESHOLD}% threshold"; exit 1; }
595-
596- # Integration / E2E leg, behind the `integration` build tag, run with
597- # GOWORK=off. The hermetic destinations (sql, http, file, slog, prometheus,
598- # statsd, otel) and the flagship sinkflow example run end-to-end; the
599- # container-backed destinations drive a real emulator via testcontainers
600- # (Docker is available on GitHub-hosted ubuntu runners) and skip cleanly if a
601- # daemon is ever absent. Kept off the default test matrix so the hermetic
602- # checks stay fast.
603- integration :
604- needs : changes
605- if : needs.changes.outputs.code == 'true'
606- strategy :
607- fail-fast : false
608- matrix :
609- module :
610- - sink/file
611- - sink/http
612- - sink/prometheus
613- - sink/slog
614- - sink/sql
615- - sink/statsd
616- - sink/otel
617- - sink/cloudwatch
618- - sink/dynamo
619- - sink/eventbridge
620- - sink/firehose
621- - sink/gcppubsub
622- - sink/kafka
623- - sink/kinesis
624- - sink/nats
625- - sink/redis
626- - sink/s3
627- - sink/sns
628- - sink/sqs
629- - sink/timestream
630- - examples/sinkflow
631- runs-on : ubuntu-latest
632- env :
633- GOWORK : " off"
634- steps :
635- - uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
636- - uses : actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
637- with :
638- go-version : " 1.26.4"
639- cache-dependency-path : " **/go.sum"
640- - name : integration tests
641- shell : bash
642- run : go test -C "${{ matrix.module }}" -tags integration ./...
643-
644545 # Single required status check. Branch protection requires only `gate`, which
645546 # aggregates the required jobs: it fails if any of them failed or was
646547 # cancelled, and treats a skipped job (docs-only PRs, or PRs that touch no
@@ -649,7 +550,7 @@ jobs:
649550 # never blocks a merge.
650551 gate :
651552 if : always()
652- needs : [changes, lint, tests, vuln, coverage, docs, sink-destinations, integration ]
553+ needs : [changes, lint, tests, sink, vuln, coverage, docs]
653554 runs-on : ubuntu-latest
654555 steps :
655556 - name : Fail if a required job did not pass
0 commit comments