mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-04-30 04:49:33 +00:00
ci: add mock test workflow for PRs (#977)
Runs `bash test/mock.sh` on every pull request targeting main. Includes concurrency grouping to cancel stale runs and a 10-minute timeout. Results are posted to the GitHub Actions step summary. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
b2628e91c1
commit
50b2e98d7d
1 changed files with 28 additions and 0 deletions
28
.github/workflows/test.yml
vendored
Normal file
28
.github/workflows/test.yml
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
name: Test
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
concurrency:
|
||||
group: test-${{ github.head_ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
mock-tests:
|
||||
name: Mock Tests
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Run mock tests
|
||||
run: |
|
||||
bash test/mock.sh 2>&1 | tee /tmp/mock-output.log
|
||||
- name: Post summary
|
||||
if: always()
|
||||
run: |
|
||||
echo '## Mock Test Results' >> "$GITHUB_STEP_SUMMARY"
|
||||
echo '```' >> "$GITHUB_STEP_SUMMARY"
|
||||
grep -E '(Results:|✓|✗|skip|━━━)' /tmp/mock-output.log | head -100 >> "$GITHUB_STEP_SUMMARY"
|
||||
echo '```' >> "$GITHUB_STEP_SUMMARY"
|
||||
Loading…
Add table
Add a link
Reference in a new issue