From b4e48fd56c8c02cf77d641fd9e96692ffa6999b4 Mon Sep 17 00:00:00 2001 From: midzelis Date: Tue, 3 Feb 2026 15:12:30 +0000 Subject: [PATCH] feat: run maintance tests in isolation, share containers between all serial test suites --- .github/workflows/test.yml | 30 +++++++++++++++++++++++++++--- e2e/playwright.config.ts | 7 +++++++ 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 28a74ff33f..50465e4191 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -497,14 +497,15 @@ jobs: run: npx playwright install chromium --only-shell if: ${{ !cancelled() }} - name: Docker build - run: docker compose build + run: docker compose up -d --build --renew-anon-volumes --force-recreate --remove-orphans --wait --wait-timeout 300 if: ${{ !cancelled() }} - name: Run e2e tests (web) env: CI: true + PLAYWRIGHT_DISABLE_WEBSERVER: true run: npx playwright test --project=chromium if: ${{ !cancelled() }} - - name: Archive web results + - name: Archive e2e test (web) results uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 if: success() || failure() with: @@ -513,14 +514,37 @@ jobs: - name: Run ui tests (web) env: CI: true + PLAYWRIGHT_DISABLE_WEBSERVER: true run: npx playwright test --project=ui if: ${{ !cancelled() }} - - name: Archive ui results + - name: Archive ui test (web) results uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 if: success() || failure() with: name: e2e-ui-test-results-${{ matrix.runner }} path: e2e/playwright-report/ + - name: Run maintenance tests (web) + env: + CI: true + PLAYWRIGHT_DISABLE_WEBSERVER: true + run: npx playwright test --project=maintenance-isolated + if: ${{ !cancelled() }} + - name: Archive maintenance tests (web) results + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 + if: success() || failure() + with: + name: e2e-maintenance-isolated-test-results-${{ matrix.runner }} + path: e2e/playwright-report/ + - name: Capture Docker logs + if: always() + run: docker compose logs --no-color > docker-compose-logs.txt + working-directory: ./e2e + - name: Archive Docker logs + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 + if: always() + with: + name: docker-compose-logs-${{ matrix.runner }} + path: e2e/docker-compose-logs.txt success-check-e2e: name: End-to-End Tests Success needs: [e2e-tests-server-cli, e2e-tests-web] diff --git a/e2e/playwright.config.ts b/e2e/playwright.config.ts index 58f5997343..f86d326baf 100644 --- a/e2e/playwright.config.ts +++ b/e2e/playwright.config.ts @@ -37,6 +37,7 @@ const config: PlaywrightTestConfig = { name: 'chromium', use: { ...devices['Desktop Chrome'] }, testMatch: /.*\.e2e-spec\.ts/, + testIgnore: /(maintenance|database-backups)\.e2e-spec\.ts/, workers: 1, }, { @@ -46,6 +47,12 @@ const config: PlaywrightTestConfig = { fullyParallel: true, workers: process.env.CI ? 3 : Math.max(1, Math.round(cpus().length * 0.75) - 1), }, + { + name: 'maintenance-isolated', + use: { ...devices['Desktop Chrome'] }, + testMatch: /(maintenance|database-backups)\.e2e-spec\.ts/, + workers: 1, + }, // { // name: 'firefox',