feat: add vitest (#147) #217
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: | |
- main | |
pull_request: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.number }} | |
cancel-in-progress: true | |
jobs: | |
test_setup: | |
name: Test setup | |
runs-on: ubuntu-latest | |
outputs: | |
preview_url: ${{ steps.waitForVercelPreviewDeployment.outputs.url }} | |
steps: | |
- name: Wait for Vercel preview | |
uses: patrickedqvist/wait-for-vercel-preview@v1.3.2 | |
id: waitForVercelPreviewDeployment | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
max_timeout: 300 | |
test_e2e: | |
runs-on: ubuntu-latest | |
needs: test_setup | |
timeout-minutes: 60 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Install Playwright browsers | |
run: pnpm exec playwright install --with-deps | |
- name: Run tests | |
run: pnpm test:e2e | |
env: | |
PLAYWRIGHT_TEST_BASE_URL: ${{ needs.test_setup.outputs.preview_url }} |