Skip to content

update workflow to run on preview environment #18

update workflow to run on preview environment

update workflow to run on preview environment #18

Workflow file for this run

name: E2E tests
on: [pull_request]
jobs:
vercel-ta:
name: Wait for Preview deployment
runs-on: ubuntu-latest
timeout-minutes: 15
outputs:
preview_url: ${{ steps.waitForVercelPreviewDeployment.outputs.url }}
steps:
- name: Wait for Preview environment
uses: patrickedqvist/wait-for-vercel-preview
id: waitForVercelPreviewDeployment
with:
environment: "Preview – Tools"
token: ${{ secrets.GITHUB_TOKEN }}
check_interval: 30
max_timeout: 400
e2e-tools:
name: E2E - Tools
runs-on: ubuntu-latest
timeout-minutes: 10
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
show-progress: false
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"
- name: Show preview url
run: echo ${{ needs.vercel-ta.outputs.preview_url }}
- name: Install browsers
run: pnpm exec playwright install chromium
working-directory: packages/apps/tools
- name: Run Playwright tests
run: pnpm run test:e2e --filter @kadena/tools
env:
CI: true
PLAYWRIGHT_BASE_URL: ${{ needs.vercel-ta.outputs.preview_url }}
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: packages/apps/tools/playwright-report/
retention-days: 30