test: add package installation end-to-end coverage

This commit is contained in:
morluto
2026-07-12 22:09:34 +00:00
parent 3a21f16c18
commit 993356b85a
9 changed files with 219 additions and 5 deletions
+16
View File
@@ -43,3 +43,19 @@ jobs:
- name: Publish
run: npm publish --access public
- name: Verify published CLI from npm
shell: bash
run: |
version="$(node --input-type=module -e 'import packageJson from "./package.json" with { type: "json" }; process.stdout.write(packageJson.version)')"
for attempt in 1 2 3 4 5 6; do
if npm view "rea-agents@${version}" version --json >/dev/null 2>&1; then
npx --yes --package "rea-agents@${version}" rea --help
npx --yes --package "rea-agents@${version}" rea --llms
npm run verify:published -- "${version}"
exit 0
fi
if [ "${attempt}" -lt 6 ]; then sleep 10; fi
done
echo "Published rea-agents@${version} was not available from npm" >&2
exit 1