e2e #274
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.2 | |
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 }} |