ci: run unit, integration and UI tests as parallel jobs
Gitea Actions Runner Test / test-job (push) Successful in 0s
CI / check (push) Successful in 34s
CI / tests-unit (push) Successful in 1m40s
CI / tests-integration (push) Successful in 1m42s
CI / tests-ui (push) Successful in 2m28s
CI / preflight (push) Skipped
CI / deploy (push) Successful in 1m50s
Gitea Actions Runner Test / test-job (push) Successful in 0s
CI / check (push) Successful in 34s
CI / tests-unit (push) Successful in 1m40s
CI / tests-integration (push) Successful in 1m42s
CI / tests-ui (push) Successful in 2m28s
CI / preflight (push) Skipped
CI / deploy (push) Successful in 1m50s
Split the heavy test suites out of the check job so coverage, MariaDB/Redis integration and Playwright UI tests run concurrently on the host runner (capacity raised to 4) instead of back-to-back (~2min wall-time saving). Deploy and preflight now gate on all three test jobs.
This commit is contained in:
1 parent
292268f418
commit
761bfb2940
1 file changed
+51
-8
@@ -16,11 +16,10 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# ─────────────────────────────────────────────
|
# ─────────────────────────────────────────────
|
||||||
# Lint, typecheck & unit tests
|
# Fast quality gate: toolchain, install, dependabot audit,
|
||||||
# Draait op de host (self-hosted) waar Node 26 +
|
# lint, i18n contracts & typecheck. No heavy test suites here.
|
||||||
# pnpm 11 geïnstalleerd zijn en internet beschikbaar is.
|
# Draait op de host (self-hosted) waar Node 26 + pnpm 11
|
||||||
# De job-container (docker mode) heeft GEEN outbound
|
# geïnstalleerd zijn en internet beschikbaar is.
|
||||||
# internet, dus we draaien alles direct op de host.
|
|
||||||
# ─────────────────────────────────────────────
|
# ─────────────────────────────────────────────
|
||||||
check:
|
check:
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
@@ -49,7 +48,25 @@ jobs:
|
|||||||
- name: Typecheck
|
- name: Typecheck
|
||||||
run: pnpm typecheck
|
run: pnpm typecheck
|
||||||
|
|
||||||
- name: Test
|
# ─────────────────────────────────────────────
|
||||||
|
# Test suites. Parallel jobs (host runner capacity >= 3) so unit,
|
||||||
|
# integration and UI tests each get a worker instead of running
|
||||||
|
# back-to-back inside the check job (~2min wall-time saving).
|
||||||
|
# ─────────────────────────────────────────────
|
||||||
|
tests-unit:
|
||||||
|
needs: check
|
||||||
|
runs-on: self-hosted
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: ${{ gitea.repository }}
|
||||||
|
token: ${{ gitea.token }}
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
|
- name: Unit & coverage tests
|
||||||
env:
|
env:
|
||||||
SKIP_ENV_VALIDATION: 1
|
SKIP_ENV_VALIDATION: 1
|
||||||
NODE_ENV: test
|
NODE_ENV: test
|
||||||
@@ -64,9 +81,35 @@ jobs:
|
|||||||
time pnpm test:coverage --maxWorkers=4
|
time pnpm test:coverage --maxWorkers=4
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
tests-integration:
|
||||||
|
needs: check
|
||||||
|
runs-on: self-hosted
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: ${{ gitea.repository }}
|
||||||
|
token: ${{ gitea.token }}
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: MariaDB and Redis integration tests
|
- name: MariaDB and Redis integration tests
|
||||||
run: pnpm test:integration
|
run: pnpm test:integration
|
||||||
|
|
||||||
|
tests-ui:
|
||||||
|
needs: check
|
||||||
|
runs-on: self-hosted
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: ${{ gitea.repository }}
|
||||||
|
token: ${{ gitea.token }}
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
# Compare against reviewed Linux references; updates are explicit.
|
# Compare against reviewed Linux references; updates are explicit.
|
||||||
- name: Install UI test browser
|
- name: Install UI test browser
|
||||||
run: pnpm exec playwright install chromium
|
run: pnpm exec playwright install chromium
|
||||||
@@ -87,7 +130,7 @@ jobs:
|
|||||||
|
|
||||||
# Validate branch/PR Docker images before integration into a deployment branch.
|
# Validate branch/PR Docker images before integration into a deployment branch.
|
||||||
preflight:
|
preflight:
|
||||||
needs: check
|
needs: [tests-unit, tests-integration, tests-ui]
|
||||||
if: gitea.event_name == 'pull_request' || (gitea.event_name == 'push' && startsWith(gitea.ref, 'refs/heads/codex/'))
|
if: gitea.event_name == 'pull_request' || (gitea.event_name == 'push' && startsWith(gitea.ref, 'refs/heads/codex/'))
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
steps:
|
steps:
|
||||||
@@ -121,7 +164,7 @@ jobs:
|
|||||||
# toegang heeft tot de daemon en volumes.
|
# toegang heeft tot de daemon en volumes.
|
||||||
# ─────────────────────────────────────────────
|
# ─────────────────────────────────────────────
|
||||||
deploy:
|
deploy:
|
||||||
needs: check
|
needs: [tests-unit, tests-integration, tests-ui]
|
||||||
if: gitea.event_name == 'push' && (gitea.ref_name == 'main' || gitea.ref_name == 'master')
|
if: gitea.event_name == 'push' && (gitea.ref_name == 'main' || gitea.ref_name == 'master')
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
Reference in new issue
Block a user