Initial Playwright tests + style updates #2
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: Playwright Tests | ||
on: [pull_request] | ||
jobs: | ||
prepare: | ||
name: Wait for deployment on Netlify | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Waiting for Netlify Preview | ||
uses: josephduffy/wait-for-netlify-action@v1 | ||
id: wait-for-netlify-preview | ||
with: | ||
site_name: "heffner" | ||
max_timeout: 180 | ||
test: | ||
needs: tests_e2e_netlify_prepare | ||
name: Run end-to-end tests on Netlify PR preview | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
- name: install dependencies | ||
run: npm ci | ||
- name: install playwright browsers | ||
run: npx playwright install --with-deps | ||
- name: run tests | ||
run: npm run test | ||
env: | ||
PLAYWRIGHT_TEST_BASE_URL: "https://deploy-preview-${{env.GITHUB_PR_NUMBER}}--heffner.netlify.app/" | ||
- uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: playwright-report | ||
path: playwright-report/ | ||
retention-days: 30 |