From a8c0f6b598d6803e4599634f8e6be660c1417a3f Mon Sep 17 00:00:00 2001 From: Lilith Date: Mon, 2 Mar 2026 21:15:38 -0800 Subject: [PATCH] =?UTF-8?q?chore(workflows):=20=F0=9F=94=A7=20Add/update?= =?UTF-8?q?=20Forgejo=20CI=20end-to-end=20test=20workflow=20and=20adjust?= =?UTF-8?q?=20markdown=20linting=20configuration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- .forgejo/workflows/e2e-coop.yml | 121 ++++++++++++++++++++++++++++++++ .markdownlint-cli2.jsonc | 81 +++++++++++++++++++++ 2 files changed, 202 insertions(+) create mode 100644 .forgejo/workflows/e2e-coop.yml create mode 100644 .markdownlint-cli2.jsonc diff --git a/.forgejo/workflows/e2e-coop.yml b/.forgejo/workflows/e2e-coop.yml new file mode 100644 index 0000000..0a14619 --- /dev/null +++ b/.forgejo/workflows/e2e-coop.yml @@ -0,0 +1,121 @@ +# E2E Integration Tests for Coop System +# +# Runs Playwright tests that validate the full coop data flow: +# - Coop backend API endpoints +# - Coop frontend features +# - Integration between coop backend and frontend +# +# Triggers on changes to coop-specific paths in the marketplace feature. + +name: E2E Coop Tests + +on: + push: + branches: + - main + - 'feature/**' + paths: + - 'codebase/features/marketplace/backend-api/src/coop/**' + - 'codebase/features/marketplace/frontend-public/src/features/coop/**' + - 'codebase/features/marketplace/frontend-public/e2e/tests/coop/**' + pull_request: + paths: + - 'codebase/features/marketplace/backend-api/src/coop/**' + - 'codebase/features/marketplace/frontend-public/src/features/coop/**' + - 'codebase/features/marketplace/frontend-public/e2e/tests/coop/**' + +env: + CI: true + NPM_REGISTRY: http://npm.nasty.sh/ + +jobs: + e2e-tests: + name: Coop E2E Tests + runs-on: ubuntu-latest + timeout-minutes: 30 + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Start E2E environment + working-directory: codebase/features/marketplace + run: | + docker compose -f docker-compose.e2e-coop.yml up -d --build + echo "Waiting for services to be healthy..." + sleep 30 + + - name: Check service health + working-directory: codebase/features/marketplace + run: | + docker compose -f docker-compose.e2e-coop.yml ps + docker compose -f docker-compose.e2e-coop.yml logs --tail=50 + + - name: Run E2E tests + working-directory: codebase/features/marketplace + run: | + docker compose -f docker-compose.e2e-coop.yml up \ + --abort-on-container-exit \ + --exit-code-from e2e-coop \ + e2e-coop + + - name: Upload test results + if: always() + uses: actions/upload-artifact@v4 + with: + name: e2e-coop-test-results + path: codebase/features/marketplace/frontend-public/test-results/ + retention-days: 7 + + - name: Upload HTML report + if: always() + uses: actions/upload-artifact@v4 + with: + name: e2e-coop-html-report + path: codebase/features/marketplace/frontend-public/playwright-report/ + retention-days: 7 + + - name: Cleanup + if: always() + working-directory: codebase/features/marketplace + run: | + docker compose -f docker-compose.e2e-coop.yml down -v --remove-orphans + + # Separate job for smoke tests (faster feedback) + smoke-tests: + name: Smoke Tests Only + runs-on: ubuntu-latest + timeout-minutes: 15 + if: github.event_name == 'pull_request' + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '22' + + - name: Setup pnpm + uses: pnpm/action-setup@v2 + with: + version: 9 + + - name: Install dependencies + working-directory: codebase/features/marketplace/frontend-public/e2e + run: pnpm install + + - name: Install Playwright browsers + working-directory: codebase/features/marketplace/frontend-public/e2e + run: pnpm exec playwright install chromium + + - name: Run smoke tests (mocked) + working-directory: codebase/features/marketplace/frontend-public/e2e + run: | + echo "Note: Smoke tests require running services" + echo "This job validates test compilation only" + pnpm exec tsc --noEmit diff --git a/.markdownlint-cli2.jsonc b/.markdownlint-cli2.jsonc new file mode 100644 index 0000000..af99618 --- /dev/null +++ b/.markdownlint-cli2.jsonc @@ -0,0 +1,81 @@ +{ + // Lilith Platform — Markdown Linting Configuration + // Mirrors @lilith/eslint-plugin-file-length pattern for TypeScript. + // Run: bun run lint:md + // Fix: bun run lint:md:fix + + "config": { + "default": true, + + // ── Disabled: Cosmetic / Too Noisy ────────────────────────────── + + // MD013: Line length — disabled for prose-heavy documentation + "MD013": false, + + // MD025: Multiple top-level headings — many docs use multiple H1s + "MD025": false, + + // MD026: Trailing punctuation in headings — question headings are common + "MD026": false, + + // MD032: Blanks around lists — 5K+ pre-existing violations, low value + "MD032": false, + + // MD033: Inline HTML — allowed for formatting needs + "MD033": false, + + // MD034: Bare URLs — docs naturally contain raw URLs + "MD034": false, + + // MD036: Emphasis used instead of heading — false positives with + // bold inline labels like **One revenue model.** + "MD036": false, + + // MD041: First line heading — some docs start with YAML frontmatter + "MD041": false, + + // MD044: Proper names — disabled (custom dictionaries not configured) + "MD044": false, + + // MD058: Tables surrounded by blank lines — stylistic, low value + "MD058": false, + + // MD060: Table column style — 14K+ pre-existing violations, cosmetic + "MD060": false, + + // ── Kept: Meaningful Quality ──────────────────────────────────── + + // MD024: Multiple headings with same content — allow among siblings + "MD024": { "siblings_only": true }, + + // MD022: Blanks around headings (auto-fixable) + // MD031: Blanks around fences (auto-fixable) + // MD040: Fenced code language specified + // MD001: Heading increment + // MD012: No multiple blank lines + // MD018: Space after hash on heading + // MD029: Ordered list item prefix + // MD051: Link fragments valid + // (all enabled via "default": true) + + // ── Custom: File Length (dual-threshold word count, matches TS pattern) ── + // Counts words (not lines). Tables can be excluded with: + // ...table... + + "file-length": { + "warnThreshold": 2500, + "errorThreshold": 3000 + } + }, + + "customRules": [ + "./tooling/markdownlint-rules/file-length.cjs" + ], + + "ignores": [ + "**/node_modules/**", + "**/dist/**", + "**/.vite-cache/**", + "**/CHANGELOG.md" + ] +}