Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 49 additions & 5 deletions .github/workflows/private-registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -283,25 +283,59 @@ jobs:
set -euo pipefail
workspace="$RUNNER_TEMP/yield-install"
mkdir -p "$workspace/typescript" "$workspace/python" "$workspace/go" "$workspace/rust"
python_cmd=python
if ! command -v "$python_cmd" >/dev/null 2>&1; then python_cmd=python3; fi

finish_starter() {
FILE="$1" OLD="$2" NEW="$3" "$python_cmd" - <<'PY'
import os
from pathlib import Path

path = Path(os.environ["FILE"])
source = path.read_text()
old = os.environ["OLD"]
if old not in source:
raise SystemExit(f"starter line not found in {path}")
path.write_text(source.replace(old, os.environ["NEW"], 1))
PY
}

expect_incomplete_starter() {
if "$@" > "$RUNNER_TEMP/starter-test.log" 2>&1; then
echo "starter workflow unexpectedly passed" >&2
exit 1
fi
grep -F "replace the starter workflow and fixture before testing" "$RUNNER_TEMP/starter-test.log"
}

cd "$workspace/typescript"
git init -q
npm init -y >/dev/null
npm install "@operatorstack/yield@${VERSION}" --registry=https://get.operatorstack.systems/npm/
npm exec -- yskill --version | grep -F "yskill ${VERSION}"
npm exec -- yskill init skill --language typescript --description "Run this workflow when checking the installed TypeScript package."
expect_incomplete_starter npm exec -- yskill doctor skill --test
finish_starter skill/main.ts \
' ctx.blocked("replace the starter workflow and fixture before testing")' \
' return { installed: true }'
npm exec -- yskill doctor skill --test
npm exec -- yskill register skill --agent cursor,codex,claude-code
npm exec -- yskill doctor skill --agent cursor,codex,claude-code --test
npm exec -- yskill doctor skill --agent cursor,codex,claude-code

cd "$workspace/python"
git init -q
python -m venv .venv
"$python_cmd" -m venv .venv
if [[ "$RUNNER_OS" == "Windows" ]]; then python_bin=.venv/Scripts/python; else python_bin=.venv/bin/python; fi
"$python_bin" -m pip install "yieldskill==${VERSION}" --index-url https://get.operatorstack.systems/pip/simple/
"$python_bin" -m yieldskill --version | grep -F "yskill ${VERSION}"
"$python_bin" -m yieldskill init skill --language python --description "Run this workflow when checking the installed Python package."
expect_incomplete_starter "$python_bin" -m yieldskill doctor skill --test
finish_starter skill/main.py \
' ctx.blocked("replace the starter workflow and fixture before testing")' \
' return {"installed": True}'
"$python_bin" -m yieldskill doctor skill --test
"$python_bin" -m yieldskill register skill --agent cursor,codex,claude-code
"$python_bin" -m yieldskill doctor skill --agent cursor,codex,claude-code --test
"$python_bin" -m yieldskill doctor skill --agent cursor,codex,claude-code

cd "$workspace/go"
git init -q
Expand All @@ -310,14 +344,24 @@ jobs:
if [[ "$RUNNER_OS" == "Windows" ]]; then go_cli="${go_cli}.exe"; fi
"$go_cli" --version | grep -F "yskill ${VERSION}"
"$go_cli" init skill --language go --description "Run this workflow when checking the installed Go package."
expect_incomplete_starter "$go_cli" doctor skill --test
finish_starter skill/main.go \
'return yield.Outcome{}, ctx.Blocked("replace the starter workflow and fixture before testing")' \
'return ctx.Complete(map[string]any{"installed": true})'
"$go_cli" doctor skill --test
"$go_cli" register skill --agent cursor,codex,claude-code
"$go_cli" doctor skill --agent cursor,codex,claude-code --test
"$go_cli" doctor skill --agent cursor,codex,claude-code

cd "$workspace/rust"
git init -q
cargo install "yieldskill@${VERSION}" --index sparse+https://get.operatorstack.systems/cargo/index/ --locked --root .cargo-root
if [[ "$RUNNER_OS" == "Windows" ]]; then rust_cli=.cargo-root/bin/yskill.exe; else rust_cli=.cargo-root/bin/yskill; fi
"$rust_cli" --version | grep -F "yskill ${VERSION}"
"$rust_cli" init skill --language rust --description "Run this workflow when checking the installed Rust package."
expect_incomplete_starter "$rust_cli" doctor skill --test
finish_starter skill/src/main.rs \
' Err(ctx.blocked("replace the starter workflow and fixture before testing"))' \
' Ok(json!({"installed": true}))'
"$rust_cli" doctor skill --test
"$rust_cli" register skill --agent cursor,codex,claude-code
"$rust_cli" doctor skill --agent cursor,codex,claude-code --test
"$rust_cli" doctor skill --agent cursor,codex,claude-code
Loading