Skip to content

Add GitHub Actions Playwright integration workflow for JA/EN website locale rendering with screenshot artifacts#2925

Merged
sensuikan1973 merged 3 commits into
mainfrom
copilot/add-playwright-test-for-localization
May 4, 2026
Merged

Add GitHub Actions Playwright integration workflow for JA/EN website locale rendering with screenshot artifacts#2925
sensuikan1973 merged 3 commits into
mainfrom
copilot/add-playwright-test-for-localization

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 4, 2026

This PR adds CI coverage for website localization by verifying that both Japanese and English pages render correctly in GitHub Actions. A new dedicated workflow (website_integration_test.yaml) builds the Docusaurus site, serves it, runs Playwright assertions against locale-specific routes, and uploads locale page screenshots as workflow artifacts.

  • Workflow: website locale integration test

    • Added .github/workflows/website_integration_test.yaml
    • Triggers on:
      • pull_request changes under website/** and the workflow file
      • push to main for the same paths
      • manual dispatch
  • Website runtime setup in CI

    • Reuses existing Node version resolution (nodenv/actions/node-version + actions/setup-node)
    • Runs website dependency install and static build in website/
    • Starts yarn serve on 127.0.0.1:3000
    • Waits for both locale endpoints to become reachable before testing
  • Playwright assertions for JA/EN correctness

    • Executes Playwright checks against:
      • /pedax/ (default locale: JA)
      • /pedax/en/ (EN locale)
    • Validates page load success and locale-specific visible text
    • Captures full-page screenshots during tests:
      • ja-page.png
      • en-page.png
  • Artifacts

    • Uploads screenshots using actions/upload-artifact@v4
    • Artifact name: website-integration-screenshots
    • Upload step runs with if: always() so screenshots are preserved for debugging
- name: Verify JA/EN website pages with Playwright
  run: |
    yarn serve --port 3000 --host 127.0.0.1 >"$RUNNER_TEMP/docusaurus-serve.log" 2>&1 &
    # wait until /pedax/ and /pedax/en/ are reachable...
    npm install --no-fund --no-audit @playwright/test
    npx playwright install chromium
    SCREENSHOT_DIR="$RUNNER_TEMP/playwright/screenshots" npx playwright test website.integration.spec.js --reporter=line

- name: Upload website locale screenshots
  if: always()
  uses: actions/upload-artifact@v4
  with:
    name: website-integration-screenshots
    path: ${{ runner.temp }}/playwright/screenshots

@github-actions github-actions Bot removed the website label May 4, 2026
@sensuikan1973
Copy link
Copy Markdown
Owner

@copilot website integration test について、テスト中に確認した en と ja のページのスクショをその wrokflow の artifacts に入れて欲しい

@codecov
Copy link
Copy Markdown

codecov Bot commented May 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.13%. Comparing base (d408d59) to head (800715d).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2925   +/-   ##
=======================================
  Coverage   94.13%   94.13%           
=======================================
  Files          52       52           
  Lines        1483     1483           
=======================================
  Hits         1396     1396           
  Misses         87       87           
Flag Coverage Δ
integration_test 65.00% <ø> (ø)
macos-latest 93.05% <ø> (ø)
ubuntu 93.59% <ø> (ø)
widget_test 90.28% <ø> (ø)
windows 93.45% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Agent-Logs-Url: https://github.com/sensuikan1973/pedax/sessions/d3b24a0c-0c7f-4f12-95a2-ef116bd57001

Co-authored-by: sensuikan1973 <23427957+sensuikan1973@users.noreply.github.com>
@github-actions github-actions Bot removed the website label May 4, 2026
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 4, 2026

@copilot website integration test について、テスト中に確認した en と ja のページのスクショをその wrokflow の artifacts に入れて欲しい

対応しました。800715d で Playwright テスト内で ja-page.png / en-page.png を保存し、workflow artifact website-integration-screenshots としてアップロードするように変更しています。

Copilot AI changed the title Add GitHub Actions Playwright integration workflow for JA/EN website locale rendering Add GitHub Actions Playwright integration workflow for JA/EN website locale rendering with screenshot artifacts May 4, 2026
Copilot AI requested a review from sensuikan1973 May 4, 2026 15:01
@sensuikan1973 sensuikan1973 merged commit 3365ce1 into main May 4, 2026
25 checks passed
@sensuikan1973 sensuikan1973 deleted the copilot/add-playwright-test-for-localization branch May 4, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants