feat: update UI #19
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: 🎭 Playwright Tests | |
on: | |
push: | |
branches: | |
- dev | |
pull_request: | |
branches: | |
- main | |
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@main | |
id: waitForVercelPreviewDeployment | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
check_interval: 10 | |
max_timeout: 1440 | |
test_e2e: | |
needs: test_setup | |
name: 📝 Playwright tests | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
steps: | |
- name: 💌 Check out code | |
uses: actions/checkout@v4 | |
- name: 🏗️ Setup pnpm | |
uses: pnpm/action-setup@v4 | |
- name: 🏗️ Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: latest | |
cache: "pnpm" | |
- name: 📥 Install test dependencies | |
run: pnpm install | |
- name: 📥 Install Playwright | |
run: pnpm playwright install --with-deps | |
- name: 🧪 Run tests | |
run: npm run test:e2e | |
env: | |
PLAYWRIGHT_TEST_BASE_URL: ${{ needs.test_setup.outputs.preview_url }} |