spawn/.github/workflows/qa.yml
A 6081c0a17f
feat(qa): telegram soak test on digitalocean + fix bun -e (#2547)
- soak.sh: SOAK_CLOUD env var makes cloud configurable (default: sprite)
- qa.sh: load TELEGRAM_BOT_TOKEN, TELEGRAM_TEST_CHAT_ID, SOAK_CLOUD from
  /etc/spawn-qa-auth.env in soak mode
- qa.yml: add weekly Monday 3am UTC scheduled soak trigger
- fix: bun eval → bun -e across soak.sh, key-request.sh, github-auth.sh
  (bun eval is not a valid subcommand in bun 1.3.9)
- fix: export _TOKEN via env prefix so process.env._TOKEN works in bun -e
- docs: update shell-scripts.md rule to say bun -e (not bun eval)

Verified: 3/4 Telegram tests pass in smoke test on DigitalOcean (120s wait)
getMe ✓ sendMessage ✓ getWebhookInfo ✓; cron test needs full 55-min window.

Co-authored-by: spawn-qa-bot <qa@openrouter.ai>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-12 19:45:18 -04:00

35 lines
1.1 KiB
YAML

name: QA
on:
schedule:
- cron: '0 */4 * * *' # Every 4 hours — quality sweep
- cron: '0 3 * * 1' # Every Monday 3am UTC — Telegram soak test (OpenClaw on DigitalOcean)
workflow_dispatch:
inputs:
reason:
description: 'QA mode to trigger'
required: false
default: 'schedule'
type: choice
options:
- schedule
- e2e
- fixtures
- soak
jobs:
trigger:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Trigger QA cycle
env:
SPRITE_URL: ${{ secrets.QA_SPRITE_URL }}
TRIGGER_SECRET: ${{ secrets.QA_TRIGGER_SECRET }}
run: |
if [ "${{ github.event_name }}" = "schedule" ] && [ "${{ github.event.schedule }}" = "0 3 * * 1" ]; then
REASON="soak"
else
REASON="${{ github.event.inputs.reason || 'schedule' }}"
fi
curl -sS --fail-with-body -X POST \
"${SPRITE_URL}/trigger?reason=${REASON}" \
-H "Authorization: Bearer ${TRIGGER_SECRET}"