Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/playwright-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Playwright Report to GitHub Pages

on:
workflow_dispatch:
push:
branches: [main]

permissions:
contents: read
pages: write
id-token: write

jobs:
test-and-deploy:
runs-on: ubuntu-latest

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Checkout
uses: actions/checkout@v4

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Checkout E2E sources before running Playwright tests

In this repository, Playwright tests are not present locally (the existing E2E workflow checks out koreyba/EverFreeNote-e2e and runs tests from e2e/), but this job only checks out the current repo and immediately runs npx playwright test. That causes "no tests found" failures on every run unless --pass-with-no-tests is added, so the workflow cannot reliably produce a report for Pages.

Useful? React with 👍 / 👎.


- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install dependencies
run: npm ci

- name: Install Playwright browsers
run: npx playwright install --with-deps

- name: Run Playwright tests
run: npx playwright test

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Configure HTML reporter before uploading Pages artifact

This workflow uploads playwright-report, but npx playwright test is run without --reporter=html (or equivalent config), so CI uses the default non-HTML reporter and may never create that directory. Playwright’s CLI docs show --reporter defaults to terminal reporters, and actions/upload-pages-artifact expects a real directory to archive; if playwright-report is missing, the upload step fails and deployment never happens.

Useful? React with 👍 / 👎.

continue-on-error: true

- name: Upload report to Pages
uses: actions/upload-pages-artifact@v3
with:
path: playwright-report

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
Loading