ix: repair CI workflow dependencies and strictness

Detailed explanation of:
- **Dependency Fix**: Added explicit Chromium installation to Firefox and WebKit security jobs. The authentication fixture depends on Chromium being present, even when testing other browsers, causing previous runs to fail setup.
- **Workflow Isolation**: Explicitly routed `tests/security/` to the dedicated "Security Enforcement" jobs and removed them from the general shards. This prevents false negatives where security config tests fail because the middleware is intentionally disabled in standard test runs.
- **Metadata**: Added `@security` tags to all security specs (`rate-limiting`, `waf-config`, etc.) to align metadata with the new execution strategy.
- **References**: Fixes CI failures in PR
This commit is contained in:
GitHub Actions
2026-02-06 04:18:26 +00:00
parent 2324619a1f
commit 9cd2f5602c
7 changed files with 28 additions and 12 deletions

View File

@@ -236,7 +236,8 @@ jobs:
npx playwright test \
--project=chromium \
tests/security-enforcement/
tests/security-enforcement/ \
tests/security/
SHARD_END=$(date +%s)
echo "SHARD_END=$SHARD_END" >> $GITHUB_ENV
@@ -401,7 +402,8 @@ jobs:
npx playwright test \
--project=firefox \
tests/security-enforcement/
tests/security-enforcement/ \
tests/security/
SHARD_END=$(date +%s)
echo "SHARD_END=$SHARD_END" >> $GITHUB_ENV
@@ -566,7 +568,8 @@ jobs:
npx playwright test \
--project=webkit \
tests/security-enforcement/
tests/security-enforcement/ \
tests/security/
SHARD_END=$(date +%s)
echo "SHARD_END=$SHARD_END" >> $GITHUB_ENV
@@ -726,7 +729,6 @@ jobs:
tests/integration \
tests/manual-dns-provider.spec.ts \
tests/monitoring \
tests/security \
tests/settings \
tests/tasks
@@ -852,6 +854,14 @@ jobs:
- name: Install dependencies
run: npm ci
- name: Install Playwright Chromium (required by security-tests dependency)
run: |
echo "📦 Installing Chromium (required by security-tests dependency)..."
npx playwright install --with-deps chromium
EXIT_CODE=$?
echo "✅ Install command completed (exit code: $EXIT_CODE)"
exit $EXIT_CODE
- name: Install Playwright Firefox
run: |
echo "📦 Installing Firefox..."
@@ -882,7 +892,6 @@ jobs:
tests/integration \
tests/manual-dns-provider.spec.ts \
tests/monitoring \
tests/security \
tests/settings \
tests/tasks
@@ -1008,6 +1017,14 @@ jobs:
- name: Install dependencies
run: npm ci
- name: Install Playwright Chromium (required by security-tests dependency)
run: |
echo "📦 Installing Chromium (required by security-tests dependency)..."
npx playwright install --with-deps chromium
EXIT_CODE=$?
echo "✅ Install command completed (exit code: $EXIT_CODE)"
exit $EXIT_CODE
- name: Install Playwright WebKit
run: |
echo "📦 Installing WebKit..."
@@ -1038,7 +1055,6 @@ jobs:
tests/integration \
tests/manual-dns-provider.spec.ts \
tests/monitoring \
tests/security \
tests/settings \
tests/tasks

View File

@@ -14,7 +14,7 @@
import { test, expect, loginUser } from '../fixtures/auth-fixtures';
import { waitForLoadingComplete, waitForToast } from '../utils/wait-helpers';
test.describe('Audit Logs', () => {
test.describe('Audit Logs @security', () => {
test.beforeEach(async ({ page, adminUser }) => {
await loginUser(page, adminUser);
await waitForLoadingComplete(page);

View File

@@ -14,7 +14,7 @@
import { test, expect, loginUser } from '../fixtures/auth-fixtures';
import { waitForLoadingComplete, waitForToast } from '../utils/wait-helpers';
test.describe('CrowdSec Configuration', () => {
test.describe('CrowdSec Configuration @security', () => {
test.beforeEach(async ({ page, adminUser }) => {
await loginUser(page, adminUser);
await waitForLoadingComplete(page);

View File

@@ -13,7 +13,7 @@
import { test, expect, loginUser } from '../fixtures/auth-fixtures';
import { waitForLoadingComplete, waitForToast } from '../utils/wait-helpers';
test.describe('Rate Limiting Configuration', () => {
test.describe('Rate Limiting Configuration @security', () => {
test.beforeEach(async ({ page, adminUser }) => {
await loginUser(page, adminUser);
await waitForLoadingComplete(page);

View File

@@ -22,7 +22,7 @@ import {
CapturedSecurityState,
} from '../utils/security-helpers';
test.describe('Security Dashboard', () => {
test.describe('Security Dashboard @security', () => {
test.beforeEach(async ({ page, adminUser }) => {
await loginUser(page, adminUser);
await waitForLoadingComplete(page);

View File

@@ -14,7 +14,7 @@
import { test, expect, loginUser } from '../fixtures/auth-fixtures';
import { waitForLoadingComplete, waitForToast } from '../utils/wait-helpers';
test.describe('Security Headers Configuration', () => {
test.describe('Security Headers Configuration @security', () => {
test.beforeEach(async ({ page, adminUser }) => {
await loginUser(page, adminUser);
await waitForLoadingComplete(page);

View File

@@ -15,7 +15,7 @@ import { test, expect, loginUser } from '../fixtures/auth-fixtures';
import { waitForLoadingComplete, waitForToast } from '../utils/wait-helpers';
import { clickSwitch } from '../utils/ui-helpers';
test.describe('WAF Configuration', () => {
test.describe('WAF Configuration @security', () => {
test.beforeEach(async ({ page, adminUser }) => {
await loginUser(page, adminUser);
await waitForLoadingComplete(page);