forked from anti-work/shortest
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (29 loc) · 974 Bytes
/
shortest.yml
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
name: "Shortest Tests"
on:
# We want to listen to Vercel deployment status events
deployment_status
jobs:
shortest:
# Only run on Vercel deployment success
if: |
github.event.deployment_status.state == 'success' &&
contains(github.event.deployment_status.target_url, 'vercel.app')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Get Vercel preview URL
id: vercel_url
run: |
DEPLOY_URL="${{ github.event.deployment_status.target_url }}"
echo "url=$DEPLOY_URL" >> $GITHUB_OUTPUT
- name: Run Shortest tests
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
run: pnpm shortest --headless --target=${{ steps.vercel_url.outputs.url }}