-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (34 loc) · 1.13 KB
/
e2e.yaml
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
35
36
37
38
39
40
name: e2e
on: [deployment_status]
jobs:
api_test:
runs-on: ubuntu-latest
name: 'E2E Test'
timeout-minutes: 3
if: github.event.deployment_status.state == 'success' && github.event.deployment.environment == 'Preview'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Enable corepack
run: corepack enable
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --ignore-scripts
- name: Get Vercel's Alias Preview URL
id: alias-preview-url
uses: justincase-jp/vercel-preview-url-alias@v0.3.3
with:
vercel_access_token: ${{ secrets.VERCEL_ACCESS_TOKEN }}
vercel_project_id: ${{ secrets.VERCEL_PROJECT_ID }}
fail_when_cancelled: false
- name: Run Tests
if: steps.alias-preview-url.outputs.status == 'READY'
run: pnpm test:e2e
env:
E2E_BASE_URL: https://${{ steps.alias-preview-url.outputs.preview_url_origin }}