-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (43 loc) · 1.58 KB
/
Copy pathtest.yml
File metadata and controls
46 lines (43 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: tests
# Reusable race-test matrix for the state-machine modules. Runs `go test -race
# ./...` for each module across the Go × OS matrix. Called by ci.yml so the legs
# render as a single collapsible tree in the checks UI (e.g. "state machine tests
# / test (1.25.11, ubuntu-latest)") instead of cluttering the top-level checks
# list. The sink-domain modules have their own reusable workflow (sink.yml).
on:
workflow_call:
inputs:
modules:
description: "Space-separated list of module directories to test."
required: true
type: string
permissions:
contents: read
jobs:
test:
strategy:
fail-fast: false
matrix:
go: ["1.25.11", "1.26.4"]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
env:
MODULES: ${{ inputs.modules }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: ${{ matrix.go }}
cache-dependency-path: "**/go.sum"
# Skip the Go cache save on Windows: the tar/zstd cache-save post-step
# flakes intermittently on windows-latest and fails the job even when
# tests pass. Linux and macOS keep caching.
cache: ${{ runner.os != 'Windows' }}
- name: test -race
shell: bash
run: |
for module in $MODULES; do
echo "::group::test -race ($module)"
go test -C "$module" -race ./...
echo "::endgroup::"
done