Merge pull request #322 from arrow2nd/add-new-poem-1705808521 #516
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: e2e | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
e2e: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
cache: "pnpm" | |
- name: Install dependencies | |
run: pnpm install --no-frozen-lockfile | |
- name: Setup playwright | |
run: pnpm exec playwright install --with-deps | |
- name: Waiting for Vercel Preview | |
uses: patrickedqvist/[email protected] | |
id: shinypoems | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
max_timeout: 180 | |
- name: Run E2E test | |
run: | | |
pnpm run test:e2e | |
env: | |
PREVIEW_URL: ${{ steps.shinypoems.outputs.url }} | |
- name: Upload report | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: playwright-report-e2e | |
path: playwright-report/ | |
retention-days: 30 |