feat: run maintance tests in isolation, share containers between all serial test suites

This commit is contained in:
midzelis
2026-02-03 15:12:30 +00:00
parent 25f2273e24
commit b4e48fd56c
2 changed files with 34 additions and 3 deletions

View File

@@ -497,14 +497,15 @@ jobs:
run: npx playwright install chromium --only-shell run: npx playwright install chromium --only-shell
if: ${{ !cancelled() }} if: ${{ !cancelled() }}
- name: Docker build - 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() }} if: ${{ !cancelled() }}
- name: Run e2e tests (web) - name: Run e2e tests (web)
env: env:
CI: true CI: true
PLAYWRIGHT_DISABLE_WEBSERVER: true
run: npx playwright test --project=chromium run: npx playwright test --project=chromium
if: ${{ !cancelled() }} if: ${{ !cancelled() }}
- name: Archive web results - name: Archive e2e test (web) results
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
if: success() || failure() if: success() || failure()
with: with:
@@ -513,14 +514,37 @@ jobs:
- name: Run ui tests (web) - name: Run ui tests (web)
env: env:
CI: true CI: true
PLAYWRIGHT_DISABLE_WEBSERVER: true
run: npx playwright test --project=ui run: npx playwright test --project=ui
if: ${{ !cancelled() }} if: ${{ !cancelled() }}
- name: Archive ui results - name: Archive ui test (web) results
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
if: success() || failure() if: success() || failure()
with: with:
name: e2e-ui-test-results-${{ matrix.runner }} name: e2e-ui-test-results-${{ matrix.runner }}
path: e2e/playwright-report/ 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: success-check-e2e:
name: End-to-End Tests Success name: End-to-End Tests Success
needs: [e2e-tests-server-cli, e2e-tests-web] needs: [e2e-tests-server-cli, e2e-tests-web]

View File

@@ -37,6 +37,7 @@ const config: PlaywrightTestConfig = {
name: 'chromium', name: 'chromium',
use: { ...devices['Desktop Chrome'] }, use: { ...devices['Desktop Chrome'] },
testMatch: /.*\.e2e-spec\.ts/, testMatch: /.*\.e2e-spec\.ts/,
testIgnore: /(maintenance|database-backups)\.e2e-spec\.ts/,
workers: 1, workers: 1,
}, },
{ {
@@ -46,6 +47,12 @@ const config: PlaywrightTestConfig = {
fullyParallel: true, fullyParallel: true,
workers: process.env.CI ? 3 : Math.max(1, Math.round(cpus().length * 0.75) - 1), 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', // name: 'firefox',