-
Notifications
You must be signed in to change notification settings - Fork 0
138 lines (133 loc) · 5.29 KB
/
Copy pathyield-lab.yml
File metadata and controls
138 lines (133 loc) · 5.29 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
name: Verify Yield lab
on:
pull_request:
paths: ["labs/22-yield/**", "go.work", ".github/workflows/yield-lab.yml"]
push:
branches: [main]
paths: ["labs/22-yield/**", "go.work", ".github/workflows/yield-lab.yml"]
permissions:
contents: read
jobs:
agent-registration:
name: Agent registration (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- uses: ./.github/actions/go-setup
with:
go-version-file: labs/22-yield/yield/go.mod
cache-dependency-path: labs/22-yield/yield/go.sum
- name: Test registry and generated adapters
working-directory: labs/22-yield/yield
env:
GOWORK: "off"
run: go test ./cmd/yskill
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: ./.github/actions/go-setup
with:
go-version-file: labs/22-yield/yield/go.mod
cache-dependency-path: labs/22-yield/yield/go.sum
- uses: actions/setup-node@v4
with:
node-version: "24"
- name: Rerun first-party evaluations and verify the published result
working-directory: labs/22-yield/yield/evals
run: |
npm ci
npm test
- name: Build and smoke-test the packed TypeScript SDK
working-directory: labs/22-yield/yield/sdk/typescript
run: |
npm test
npm run build
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)'
- name: Verify package launchers and release metadata
working-directory: labs/22-yield/yield
run: |
node --test packaging/*.test.mjs
python -m unittest discover -s sdk/python -p 'test_*.py'
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
labs/22-yield/yield/sdk/rust
labs/22-yield/yield/examples/data-migration
labs/22-yield/yield/examples/library/rust
labs/22-yield/yield/internal/conformance/testdata/skill-rs
- name: Vet and test (includes subprocess e2e + 4-language conformance)
working-directory: labs/22-yield/yield
run: |
go vet ./...
go test ./...
- name: Fixture runs of the example skills (Go, TypeScript, Python, Rust)
working-directory: labs/22-yield/yield
run: |
go build -o /tmp/yskill ./cmd/yskill
/tmp/yskill test examples/investigate
/tmp/yskill test examples/release-checklist
/tmp/yskill test examples/env-doctor
/tmp/yskill test examples/data-migration
YSKILL=/tmp/yskill /tmp/yskill test examples/convert-skill
YSKILL=/tmp/yskill bash ./examples/library/test-all.sh
# Shift-left projection gate: materialize the public surface exactly as
# operatorstack/yield would receive it and compile+test it, so a broken
# projection fails at PR time instead of downstream after merge.
projection-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- uses: astral-sh/setup-uv@v7
- name: Project yield to a temp public tree
run: |
mkdir -p "$RUNNER_TEMP/yield-projected"
uv run --project labkit python -m labkit project \
--config labs/22-yield/publish.config.json \
--repo "$RUNNER_TEMP/yield-projected" \
--source-commit "${{ github.sha }}" --write
- uses: ./.github/actions/go-setup
with:
go-version-file: ${{ runner.temp }}/yield-projected/go.mod
cache-dependency-path: ${{ runner.temp }}/yield-projected/go.sum
- uses: actions/setup-node@v4
with:
node-version: "24"
- name: Rerun projected first-party evaluations
working-directory: ${{ runner.temp }}/yield-projected/evals
run: |
npm ci
npm test
- name: Build and smoke-test the projected TypeScript package
working-directory: ${{ runner.temp }}/yield-projected/sdk/typescript
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)'
- name: Verify projected package launchers and release metadata
working-directory: ${{ runner.temp }}/yield-projected
run: |
node --test packaging/*.test.mjs
python -m unittest discover -s sdk/python -p 'test_*.py'
- name: Build and test the projected module (incl. 4-language conformance)
working-directory: ${{ runner.temp }}/yield-projected
env:
GOWORK: "off"
run: |
go build ./...
go test ./...