Skip to content

Add e2e test job to CI workflow#480

Merged
sanak merged 3 commits into
masterfrom
ci/add-e2e-tests
May 19, 2026
Merged

Add e2e test job to CI workflow#480
sanak merged 3 commits into
masterfrom
ci/add-e2e-tests

Conversation

@sanak

@sanak sanak commented Apr 1, 2026

Copy link
Copy Markdown
Member

Summary

  • CI に e2e テストジョブを追加(maps-core の CI パターンに準拠)
  • builde2epublish/deploy のジョブ依存関係を設定
  • Playwright reporter を CI 互換性のため htmllist に変更(HTML reporter は CI 上で対話モードに入り npm run e2e が終了しないため)
  • 1.4 アトリビューションテストに waitForStyleLoad を追加(attribution は TileJSON 取得後に埋まるので、canvas 出現待ちだけでは間に合わないため)

Changes

master との累積 diff: 3 ファイル / +28 / −3 行。コミットはファイル境界に揃えて 3 本に整理。

ファイル コミット 内容
1 .github/workflows/build.yml ecf8d06 e2e ジョブ追加 + publish/deploy の依存関係更新
2 playwright.config.ts c7d6223 reporter を htmllist
3 e2e/basic.spec.ts 865d171 1.4 アトリビューションテストに waitForStyleLoad を追加

Details

  • CI では chromium のみ実行(npm run e2e)で実行時間を抑制
  • timeout-minutes: 30 でジョブのハング防止
  • 失敗・キャンセル時も Playwright レポートをアーティファクトとしてアップロード(if: !cancelled()

Test plan

  • ローカルで npm run e2e が全 10 テスト通過を確認
  • CI 上で e2e ジョブが正常に実行されることを確認(run #26066413337: build 59s + e2e 54s, ともに pass)

Summary by CodeRabbit

  • テスト
    • エンドツーエンドテストの自動実行パイプラインを追加
    • ブラウザレンダリング互換性テストを改善
    • スタイル読み込み待機を組み込み、表示検証の安定性を向上しフレークを低減

Review Change Stack

@coderabbitai

coderabbitai Bot commented Apr 1, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6eb058af-4cd1-4b4b-9638-32d0f4a5309e

📥 Commits

Reviewing files that changed from the base of the PR and between 5b2fae1 and 865d171.

📒 Files selected for processing (3)
  • .github/workflows/build.yml
  • e2e/basic.spec.ts
  • playwright.config.ts
✅ Files skipped from review due to trivial changes (1)
  • playwright.config.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/build.yml

📝 Walkthrough

Walkthrough

GitHub Actionsに新しいe2eジョブを追加し、ワークフローのpublish/deploy依存を更新、E2Eテストにスタイル読み込み待機を挿入し、Playwrightのreporterlistに変更しています。

Changes

E2E CI integration

Layer / File(s) Summary
E2E GitHub Actionsジョブ追加
.github/workflows/build.yml
新規 e2e ジョブを追加:Node 22セットアップ、npm ci、Playwright Chromium依存導入、npm run e2e 実行、playwright-report/ をアーティファクトとして条件付きアップロード(保持7日)。
ワークフロー依存関係更新
.github/workflows/build.yml
publishneedse2e を追加し、deployneeds[build, e2e] に変更。
E2Eテストの待機ロジック追加
e2e/basic.spec.ts
./helper から waitForStyleLoad を import し、アトリビューション検証前に waitForStyleLoad(page) を呼び出してスタイル読み込み完了を待機するよう修正。
Playwright設定のレポーター変更
playwright.config.ts
reporter 設定を html から list に変更。

Estimated Code Review Effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • geolonia/embed#489: e2e helper の導入(waitForStyleLoad)と関連するテスト更新。

Suggested reviewers

  • smellman

Poem

🐰 新しいジョブが朝に跳ねて、
テストの草むらでスタイルを待ち、
レポートを抱えて走り出す、
パイプラインが軽やかに一歩、
バグよ逃げろ、品質よ来い。

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PRタイトル「Add e2e test job to CI workflow」は、ファイル変更の主要な変更内容(.github/workflows/build.ymlにe2eジョブを追加)を正確かつ簡潔に要約しており、PR目的と完全に一致しています。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/add-e2e-tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/build.yml:
- Around line 67-73: The Upload Playwright report step currently uses the
conditional if: ${{ !cancelled() }} which prevents the artifact upload when a
run is cancelled; update the step named "Upload Playwright report" to use either
if: ${{ failure() || cancelled() }} to preserve artifacts for failures and
cancellations or if: ${{ always() }} to preserve artifacts in all outcomes
(success/failure/cancelled), ensuring the path: playwright-report/ still gets
uploaded and retention-days: 7 remains unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6f6a8a23-3ae4-4c6c-8060-7eb7a40c8dea

📥 Commits

Reviewing files that changed from the base of the PR and between d2f0f5e and 5b2fae1.

📒 Files selected for processing (2)
  • .github/workflows/build.yml
  • playwright.config.ts

Comment thread .github/workflows/build.yml
@sanak sanak mentioned this pull request Apr 3, 2026
@sanak
sanak marked this pull request as draft April 6, 2026 06:47
@sanak sanak self-assigned this Apr 8, 2026
@sanak
sanak force-pushed the ci/add-e2e-tests branch from 8f91c68 to a61eb87 Compare May 18, 2026 06:05
@sanak
sanak force-pushed the ci/add-e2e-tests branch from a61eb87 to 865d171 Compare May 18, 2026 23:27
@sanak
sanak marked this pull request as ready for review May 18, 2026 23:38
@sanak
sanak requested a review from a team May 19, 2026 00:00

@smellman smellman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@smellman
smellman requested a review from a team May 19, 2026 01:24

@niryuu niryuu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@sanak

sanak commented May 19, 2026

Copy link
Copy Markdown
Member Author

確認頂き、ありがとうございます!
マージします。

@sanak
sanak merged commit c8d6d07 into master May 19, 2026
11 checks passed
@sanak
sanak deleted the ci/add-e2e-tests branch May 19, 2026 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants