fix: CI 復旧 (actions/cache@v4) と 4.3 でのテスト失敗・Bootstrap 5 クラス名の修正 - #201
fix: CI 復旧 (actions/cache@v4) と 4.3 でのテスト失敗・Bootstrap 5 クラス名の修正#201ttokoro20240902 wants to merge 3 commits into
Conversation
GitHub 側で actions/cache v1 が廃止され、ワークフローが自動的に失敗する ようになったため、本ブランチの CI が全ジョブ failure になっていた。 ##[error]This request has been automatically failed because it uses a deprecated version of `actions/cache: v1`. - actions/cache@v1 → @v4 - ::set-output → $GITHUB_OUTPUT(同じく非推奨のため合わせて更新) Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
EC-CUBE 4.3 との組み合わせで 6 テストが失敗していた。decimal カラムは
Doctrine が文字列で返すため、verify() (assertSame) では型が一致しない。
CouponServiceTest::testRecalcOrderDiscountRate
Failed asserting that '623.00' is identical to 623.
CouponControllerTest::testShoppingCoupon
Failed asserting that '-100.00' is identical to -100.0.
金額の等価性を検証したいだけなので、数値等価 (assertEquals) に変更する。
4.4 対応ブランチ (#197) でも同じ方針で対応している。
- Tests/Service/CouponServiceTest.php (2 箇所)
- Tests/Web/CouponControllerTest.php (4 箇所)
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
管理画面のクーポン登録画面で、Bootstrap 4 の右マージンユーティリティ (mr-*) が残っており、スタイルが当たっていなかった。Bootstrap 5 では me-* にリネームされている。 - Resource/template/admin/regist.twig (411 / 450 / 473 行) - Resource/template/admin/regist_product_list_prototype.twig - Resource/template/admin/regist_category_list_prototype.twig admin の bootstrap.css に .mr-2 のルールは存在せず (.me-2 は存在する) 、 同じ regist.twig の 391 行だけが me-2 で不統一だった。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 39 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
概要
default ブランチ (
4.2) の CI が壊れていたため、CI の復旧・EC-CUBE 4.3 との組み合わせで失敗していたテストの追随・Bootstrap 5 のクラス名修正を行います。Bootstrap のクラス名修正は #197 のレビューで nanasess から指摘された既存不具合(4.4 対応ブランチ側は #197 に同梱済み)を default ブランチにも反映するものです。
(当初 #200 として出しましたが、CI が全ジョブ落ちる状態だったため作業ファイルの混入もあわせて整理し、出し直しました)
コミット
1.
fix(ci): 廃止されたactions/cache@v1と::set-outputを更新GitHub 側で
actions/cachev1 が廃止され、ワークフローが自動的に失敗するようになっていました。そのため本ブランチの CI は全ジョブ failure で、内容の検証ができない状態でした。actions/cache@v1→@v4::set-output→$GITHUB_OUTPUT(同じく非推奨)actions/checkout@v2などの他の古い action は本 PR では触っていません。2.
fix(test): decimal カラムの比較をassertEqualsにする上記を直すと CI が動き出し、EC-CUBE 4.3 との組み合わせで 6 テストが失敗していることが分かりました(
4.2との組み合わせは pass)。decimal カラムを Doctrine が文字列で返すようになったため、verify()(assertSame)の厳密比較が通らないものです。金額の等価性を検証したいだけなので数値等価(
assertEquals)に変更しました。#197 でも 4.4 向けに同じ方針で対応しています。Tests/Service/CouponServiceTest.phptestRecalcOrderDiscountRate/testRecalcOrderWithTaxRateIsEmpty)Tests/Web/CouponControllerTest.phptestShoppingCoupon/testShoppingCouponDiscountTypePrice/testShoppingCouponDiscountTypeRate/testCompleteWithNonmember)3.
fix: Bootstrap 5 に存在しないmr-2/mr-3をme-2/me-3に修正Bootstrap 5.3 では右マージンのユーティリティが
me-*にリネームされているため、mr-*は何のスタイルも当たっていません(ボタン/アイコンの余白が詰まって表示されます)。Resource/template/admin/regist.twigmr-3→me-3Resource/template/admin/regist.twigmr-2→me-2Resource/template/admin/regist_product_list_prototype.twigmr-3→me-3Resource/template/admin/regist_category_list_prototype.twigmr-3→me-3根拠:
html/template/admin/assets/css/bootstrap.cssに.mr-2のルールは 存在しません(.me-2は存在します)regist.twigの 391 行だけがme-2になっており不統一でしたml-*/pr-*/float-left/badge-*/sr-onlyなど)は grep で 0 件のため対象外ですテスト
CI(EC-CUBE 4.2 / 4.3 × PHP 7.4〜8.3 × MySQL 5.7 / MySQL 8 / PostgreSQL の全 18 ジョブ)で確認します。コミット 1 の適用前は全ジョブが起動すらしない状態でした。
🤖 Generated with Claude Code