From b478d9873a410db6933927f92bba8398e6e7b54d Mon Sep 17 00:00:00 2001 From: Theo Sanderson Date: Fri, 8 Mar 2024 23:51:29 +0000 Subject: [PATCH] run e2e tests just on chrome except on main branch (#1286) Co-authored-by: Cornelius Roemer --- .github/workflows/e2e-k3d.yml | 3 +++ website/playwright.config.ts | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-k3d.yml b/.github/workflows/e2e-k3d.yml index 576baf4d6..f94c97f52 100644 --- a/.github/workflows/e2e-k3d.yml +++ b/.github/workflows/e2e-k3d.yml @@ -26,6 +26,9 @@ jobs: runs-on: ubuntu-latest + env: + ALL_BROWSERS: ${{ github.ref == 'refs/heads/main' && 'true' || 'false' }} + steps: - name: Checkout repository uses: actions/checkout@v4 diff --git a/website/playwright.config.ts b/website/playwright.config.ts index 1c1da480f..636385ca3 100644 --- a/website/playwright.config.ts +++ b/website/playwright.config.ts @@ -20,17 +20,19 @@ export default defineConfig({ globalSetup: './tests/playwrightSetup.ts', projects: [ + { name: 'chromium', use: { ...devices['Desktop Chrome'] }, }, - { + ...process.env.ALL_BROWSERS === 'true' ? [{ name: 'firefox', use: { ...devices['Desktop Firefox'] }, }, { name: 'webkit', use: { ...devices['Desktop Safari'] }, - }, + }] : [], + ], });