Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GithubのActionでphp unittestがタイムアウトになりテストが通りません #1199

Open
mtdkei opened this issue Nov 20, 2024 · 1 comment

Comments

@mtdkei
Copy link
Contributor

mtdkei commented Nov 20, 2024

GithubのActionでphp unittestがタイムアウトになりテストが通らなくなっていました。

Run npx playwright test --trace on --project=chromium
  npx playwright test --trace on --project=chromium
  shell: /usr/bin/bash -e {0}
  env:
    COMPOSER_PROCESS_TIMEOUT: 0
    COMPOSER_NO_INTERACTION: 1
    COMPOSER_NO_AUDIT: 1

Running 1 test using 1 worker
××T

  1) [chromium] › css-optimize.spec.js:10:5 › CSS Optimize ─────────────────────────────────────────

    Test timeout of 60000ms exceeded.

    Error: locator.click: Test timeout of 60000ms exceeded.
    Call log:
      - waiting for getByRole('heading', { name: 'Lightning CSS Optimize ( Speed up ) Settings Press return or enter to open this section ' })


      [2](https://github.com/vektor-inc/lightning/actions/runs/11925907679/job/33239404192?pr=1198#step:16:2)5 | 	await page.getByRole('navigation', { name: 'Main menu' }).getByRole('link', { name: 'Customize' }).click();
      26 | 	// CSS最適化パネルを開く
    > 27 | 	await page.getByRole('heading', { name: 'Lightning CSS Optimize ( Speed up ) Settings Press return or enter to open this section ' }).click();
         | 	                                                                                                                                       ^
      28 |
      29 | 	// _customize-input-vk_css_optimize_options[tree_shaking] が active なら処理しない
      [3](https://github.com/vektor-inc/lightning/actions/runs/11925907679/job/33239404192?pr=1198#step:16:3)0 | 	// #save が disabled なら処理しない

        at /home/runner/work/lightning/lightning/tests/e2e/css-optimize.spec.js:27:137

    attachment #1: trace (application/zip) ─────────────────────────────────────────────────────────
    test-results/css-optimize-CSS-Optimize-chromium/trace.zip
    Usage:

        npx playwright show-trace test-results/css-optimize-CSS-Optimize-chromium/trace.zip

    ────────────────────────────────────────────────────────────────────────────────────────────────

    Retry #1 ───────────────────────────────────────────────────────────────────────────────────────

    Test timeout of 60000ms exceeded.

    Error: locator.click: Test timeout of 60000ms exceeded.
    Call log:
      - waiting for getByRole('heading', { name: 'Lightning CSS Optimize ( Speed up ) Settings Press return or enter to open this section ' })


      2[5](https://github.com/vektor-inc/lightning/actions/runs/11925907679/job/33239404192?pr=1198#step:16:5) | 	await page.getByRole('navigation', { name: 'Main menu' }).getByRole('link', { name: 'Customize' }).click();
      2[6](https://github.com/vektor-inc/lightning/actions/runs/11925907679/job/33239404192?pr=1198#step:16:6) | 	// CSS最適化パネルを開く
    > 2[7](https://github.com/vektor-inc/lightning/actions/runs/11925907679/job/33239404192?pr=1198#step:16:7) | 	await page.getByRole('heading', { name: 'Lightning CSS Optimize ( Speed up ) Settings Press return or enter to open this section ' }).click();
         | 	                                                                                                                                       ^
      2[8](https://github.com/vektor-inc/lightning/actions/runs/11925907679/job/33239404192?pr=1198#step:16:9) |
      2[9](https://github.com/vektor-inc/lightning/actions/runs/11925907679/job/33239404192?pr=1198#step:16:10) | 	// _customize-input-vk_css_optimize_options[tree_shaking] が active なら処理しない
      30 | 	// #save が disabled なら処理しない

        at /home/runner/work/lightning/lightning/tests/e2e/css-optimize.spec.js:27:137

    attachment #1: trace (application/zip) ─────────────────────────────────────────────────────────
    test-results/css-optimize-CSS-Optimize-chromium-retry1/trace.zip
    Usage:

        npx playwright show-trace test-results/css-optimize-CSS-Optimize-chromium-retry1/trace.zip

    ────────────────────────────────────────────────────────────────────────────────────────────────

    Retry #2 ───────────────────────────────────────────────────────────────────────────────────────

    Test timeout of 60000ms exceeded.

    Error: locator.click: Test timeout of 60000ms exceeded.
    Call log:
      - waiting for getByRole('heading', { name: 'Lightning CSS Optimize ( Speed up ) Settings Press return or enter to open this section ' })


      25 | 	await page.getByRole('navigation', { name: 'Main menu' }).getByRole('link', { name: 'Customize' }).click();
      26 | 	// CSS最適化パネルを開く
    > 27 | 	await page.getByRole('heading', { name: 'Lightning CSS Optimize ( Speed up ) Settings Press return or enter to open this section ' }).click();
         | 	                                                                                                                                       ^
      28 |
      29 | 	// _customize-input-vk_css_optimize_options[tree_shaking] が active なら処理しない
      30 | 	// #save が disabled なら処理しない

        at /home/runner/work/lightning/lightning/tests/e2e/css-optimize.spec.js:27:137

    attachment #1: trace (application/zip) ─────────────────────────────────────────────────────────
    test-results/css-optimize-CSS-Optimize-chromium-retry2/trace.zip
    Usage:

        npx playwright show-trace test-results/css-optimize-CSS-Optimize-chromium-retry2/trace.zip

    ────────────────────────────────────────────────────────────────────────────────────────────────

  1 failed
    [chromium] › css-optimize.spec.js:[10](https://github.com/vektor-inc/lightning/actions/runs/11925907679/job/33239404192?pr=1198#step:16:11):5 › CSS Optimize ──────────────────────────────────────────
Error: Process completed with exit code 1.

https://github.com/vektor-inc/lightning/actions/runs/11925907679

#1198 ではtheme.jsonでWordPress6.7の新機能のサポートを追加しただけなのでおそらくこのプルリクの問題ではないと思います。

@kurudrive
Copy link
Member

kurudrive commented Nov 20, 2024

@mtdkei Cc: @drill-lancer

  1. CSS optimize が tree shaking の挙動が怪しいため完全無効化してある
  2. playwright で tree sgaking の効き具合を確認するテストが通らなくなる

という状態です。

これにはそもそも tree shaking は本当に有効なのか?を検証して、
引き続き Lightning に採用するのか、ExUnit の機能として使ってもらうのかを判断する必要があります。

vektor-inc/vk-css-optimize#19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants