178 front task chore playwright ci #21
Workflow file for this run
This file contains hidden or 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 Test" | |
| on: | |
| pull_request: | |
| branches: | |
| - develop | |
| jobs: | |
| test-setup: | |
| name: Test setup | |
| runs-on: ubuntu-latest | |
| outputs: | |
| preview_url: ${{ steps.waitForVercelPreviewDeployment.outputs.url }} | |
| steps: | |
| - name: Waiting for 200 from the Vercel Preview | |
| uses: patrickedqvist/[email protected] | |
| id: waitForVercelPreviewDeployment | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| max_timeout: 300 | |
| e2e-test: | |
| needs: test-setup | |
| name: Playwright tests | |
| timeout-minutes: 60 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18 | |
| cache: "yarn" | |
| - name: Install dependencies | |
| run: yarn | |
| - name: Install playwright | |
| run: yarn playwright install --with-deps | |
| - name: Run playwright tests | |
| run: npx playwright test | |
| env: | |
| PLAYWRIGHT_TEST_BASE_URL: ${{ needs.test-setup.outputs.preview_url }} | |
| # run: yarn e2e:ui | |
| # env: | |
| # BASE_URL: ${{ steps.waitForDeploy.outputs.url }} | |
| # env: | |
| # PLAYWRIGHT_TEST_BASE_URL: ${{ github.event.deployment_status.target_url }} |