Niloofar | Mark | @deriv/integration and playwright implementations [POC] #20
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: Deployment Playwright Tests | ||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
jobs: | ||
test_setup: | ||
name: Test setup | ||
runs-on: ubuntu-latest | ||
outputs: | ||
preview_url: ${{ steps.waitForVercelPreviewDeployment.outputs.url }} | ||
steps: | ||
- name: Wait for Vercel preview deployment to be ready | ||
uses: patrickedqvist/wait-for-vercel-preview@1.2.0 | ||
id: waitForVercelPreviewDeployment | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
max_timeout: 600 | ||
test_e2e: | ||
needs: tests_setup | ||
name: Playwright tests | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
if: github.event.deployment_status.state == 'success' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Install Playwright | ||
run: npx playwright install --with-deps | ||
- name: Run Playwright tests | ||
run: npx playwright test | ||
env: | ||
PLAYWRIGHT_TEST_BASE_URL: ${{ github.event.deployment_status.target_url }} |