-
Notifications
You must be signed in to change notification settings - Fork 0
206 lines (193 loc) · 7.02 KB
/
Copy pathverify.yml
File metadata and controls
206 lines (193 loc) · 7.02 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
name: Verify Yield
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
concurrency:
group: verify-yield-${{ github.ref }}
cancel-in-progress: true
jobs:
format:
name: Repository formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7
with:
go-version-file: go.mod
cache: true
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
node-version: "24"
cache: npm
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: "3.12"
- run: npm ci --ignore-scripts
- run: python -m pip install uv==0.12.3
- run: npm run format:check
go:
name: Go and agent registration (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7
with:
go-version-file: go.mod
cache: true
- run: go test ./cmd/yskill
- run: go test ./...
- run: go build ./...
release:
name: Release and package controls
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
node-version: "24"
cache: npm
- run: npm ci --ignore-scripts
- run: npm run test:release
- run: node scripts/check-release-control.mjs
selfhost:
name: Published SDK self-hosting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
node-version: "24"
cache: npm
- run: npm ci --ignore-scripts
- run: npm run prepare:selfhost
- run: npm run test:selfhost
- run: npm exec -- yskill doctor skills/release-yield --root . --agent codex,cursor,claude-code
typescript:
name: TypeScript SDK and npm package
runs-on: ubuntu-latest
defaults:
run:
working-directory: sdk/typescript
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
node-version: "24"
- run: npm test
- run: npm run build
- name: Pack, install, and import the SDK
run: |
tarball="$RUNNER_TEMP/$(npm pack --silent --pack-destination "$RUNNER_TEMP")"
smoke_dir="$(mktemp -d)"
cd "$smoke_dir"
npm init -y >/dev/null
npm install "$tarball" >/dev/null
node --input-type=module -e 'import { defineSkill } from "@operatorstack/yield"; if (typeof defineSkill !== "function") process.exit(1)'
python:
name: Python SDK
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: "3.12"
- run: python -m unittest discover -s sdk/python -p 'test_*.py'
rust:
name: Rust SDK
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
with:
workspaces: sdk/rust
- run: cargo test --manifest-path sdk/rust/Cargo.toml
conformance:
name: Four-language conformance
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7
with:
go-version-file: go.mod
cache: true
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
node-version: "24"
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: "3.12"
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
with:
workspaces: |
sdk/rust
internal/conformance/testdata/skill-rs
- run: go vet ./...
- run: go test ./...
examples:
name: Example workflows
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 0
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7
with:
go-version-file: go.mod
cache: true
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
node-version: "24"
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: "3.12"
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
with:
workspaces: |
sdk/rust
examples/data-migration
examples/library/rust
- run: npm ci --ignore-scripts
- name: Run every example fixture
run: |
version=""
while IFS= read -r manifest; do
required="$(jq -er '.yield_version | select(type == "string" and length > 0)' "$manifest")"
if [[ -z "$version" ]]; then
version="$required"
else
test "$required" = "$version"
fi
done < <(find examples -name skill.json -type f -print | sort)
test -n "$version"
go build -ldflags "-X main.version=$version" -o "$RUNNER_TEMP/yskill" ./cmd/yskill
"$RUNNER_TEMP/yskill" test examples/investigate
"$RUNNER_TEMP/yskill" test examples/release-checklist
"$RUNNER_TEMP/yskill" test examples/env-doctor
"$RUNNER_TEMP/yskill" test examples/data-migration
YSKILL="$RUNNER_TEMP/yskill" "$RUNNER_TEMP/yskill" test examples/convert-skill
YSKILL="$RUNNER_TEMP/yskill" bash ./examples/library/test-all.sh
validate:
name: Release authority and full validation
if: ${{ always() }}
needs: [format, go, release, selfhost, typescript, python, rust, conformance, examples]
runs-on: ubuntu-latest
steps:
- name: Require every validation job
env:
RESULTS: ${{ toJSON(needs) }}
run: |
node -e '
const results = JSON.parse(process.env.RESULTS);
const failed = Object.entries(results).filter(([, value]) => value.result !== "success");
if (failed.length) {
console.error(failed.map(([name, value]) => `${name}: ${value.result}`).join("\n"));
process.exit(1);
}
'