-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (53 loc) · 2.09 KB
/
Copy pathci.yml
File metadata and controls
61 lines (53 loc) · 2.09 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: CI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0 # need tags for the version-tag check below
- uses: actions/setup-go@v6
with:
go-version: '1.25'
- run: go build ./...
- run: go vet ./...
- run: go vet ./examples/...
- run: go test ./... -v -race -count=1
# B17-P1: assert SDKVersion in instant/version.go matches an annotated
# vX.Y.Z git tag on the current commit, when one exists. Untagged
# commits skip the check.
- name: Verify SDKVersion matches git tag
run: |
set -euo pipefail
tag="$(git tag --points-at HEAD | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' || true)"
if [ -z "$tag" ]; then
echo "No vX.Y.Z tag on HEAD — skipping version-tag check"
exit 0
fi
expected="${tag#v}"
got="$(grep -E '^var SDKVersion = "' instant/version.go | sed -E 's/^var SDKVersion = "([^"]+)".*/\1/')"
echo "tag=$tag expected=$expected got=$got"
if [ "$got" != "$expected" ]; then
echo "::error ::SDKVersion=$got does not match tag $tag (expected $expected). Bump instant/version.go before tagging."
exit 1
fi
# Live integration tests against PROD instanode.dev. The `integration` build
# tag gates these tests (read-only: an unauthenticated list to verify the
# agent-native error envelope, plus the public capabilities matrix). They skip
# cleanly if prod is unreachable from the runner, so this job is informative on
# an isolated runner but asserts the live envelope contract when reachable.
integration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '1.25'
- run: go build -tags integration ./...
- name: Run live integration tests against prod
run: go test -tags integration ./... -v -count=1 -run TestProdIntegration