From 9755763005e649f720f49ce49d90006a5e0d8777 Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 8 Oct 2026 16:22:34 -0400 Subject: [PATCH] fix(ci): reduce website browser test flakes and skip them for cue-only changes --- .github/workflows/changes.yml | 19 +++++++++++++++++++ .github/workflows/test.yml | 3 ++- website/playwright.config.ts | 3 ++- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/.github/workflows/changes.yml b/.github/workflows/changes.yml index fd63ccac035c5..4cd9045342e97 100644 --- a/.github/workflows/changes.yml +++ b/.github/workflows/changes.yml @@ -48,6 +48,8 @@ on: value: ${{ jobs.source.outputs.scripts }} website_only: value: ${{ jobs.source.outputs.website_only }} + website_tests: + value: ${{ jobs.source.outputs.website_tests }} install: value: ${{ jobs.source.outputs.install }} actionlint: @@ -187,6 +189,7 @@ jobs: install: ${{ steps.filter.outputs.install }} k8s: ${{ steps.filter.outputs.k8s }} website_only: ${{ steps.filter.outputs.website == 'true' && steps.filter.outputs.not_website == 'false' }} + website_tests: ${{ steps.website_filter.outputs.website_tests }} actionlint: ${{ steps.filter.outputs.actionlint }} prettier: ${{ steps.filter.outputs.prettier }} test-yml: ${{ steps.filter.outputs.test-yml }} @@ -341,6 +344,22 @@ jobs: - ".github/workflows/unit_windows.yml" - ".github/workflows/changes.yml" + # Separate step because `predicate-quantifier` applies to every filter, and + # `some-with-excludes` would make negation-only filters like `not_website` never match. + - uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 + id: website_filter + with: + base: ${{ env.BASE_SHA }} + ref: ${{ env.HEAD_SHA }} + predicate-quantifier: some-with-excludes + filters: | + website_tests: + - "website/**" + - "!website/cue/**" + - ".github/workflows/website-tests.yml" + - ".github/actions/install-vrl-doc-builder/**" + - ".github/workflows/changes.yml" + # Detects changes that are specific to integration tests int_tests: runs-on: ubuntu-24.04 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b8cd6038559d5..03a4ec5397323 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -198,7 +198,8 @@ jobs: wasm-pack build --target web --out-dir public/pkg test-website: - if: ${{ github.event_name == 'merge_group' }} + if: ${{ github.event_name == 'merge_group' && (needs.changes.outputs.website_tests == 'true' || needs.changes.outputs.test-yml == 'true') }} + needs: changes permissions: contents: read id-token: write diff --git a/website/playwright.config.ts b/website/playwright.config.ts index b3a81a7412e68..2f8592dfce727 100644 --- a/website/playwright.config.ts +++ b/website/playwright.config.ts @@ -20,7 +20,8 @@ export default defineConfig({ projects: [ { name: "chromium", use: { ...devices["Desktop Chrome"] } }, { name: "firefox", use: { ...devices["Desktop Firefox"] } }, - { name: "webkit", use: { ...devices["Desktop Safari"] } } + // WebKit is several times slower than Chromium on CI and can exceed the default 30s. + { name: "webkit", timeout: 60_000, use: { ...devices["Desktop Safari"] } } ], webServer: { command: "python3 -m http.server 4173 --bind 127.0.0.1 --directory public",