This repository has been archived on 2026-11-17. You can view files and clone it, but cannot push or open issues or pull requests.
gitgram-ai/.github/workflows/gitgram-tests.yml
caelum0x 64fbe9f474 feat: round-3 deep product build-out (69 gaps closed, all 7 products green)
Deep-audit + build-out across all products to fully-usable state; all typecheck clean.

- gitgram-web (99): wire Store feature to real endpoints, close 9 gaps
- gitgram-backend (100): close 8 flow gaps, document infra-provisioning items
- gitgram-mobile (90): fix API base-URL/path mismatch (404s) + copy proximity
  components into components/proximity wired to real screens; 15 gaps, +react-native-svg
- aitm-core (95): wire natural-language CLI flow end-to-end; 11 gaps
- aitm-api (97): fix teams metadata runtime bug; copy a2a-js server/client/grpc
  into src/a2a and wire A2A route; crates.io package search; 8 gaps
- aitm-mcp (100): fix A2A client/server card mismatch; 9 gaps
- aitm-website (95): build missing docs routes; 9 gaps

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 13:54:57 +03:00

249 lines
7.1 KiB
YAML

# =============================================================================
# Gitgram Tests - Backend Jest suites, Web typecheck, and Playwright smoke.
# Triggers only on changes under gitgram/**.
# fail-fast: false so backend / web / e2e all report independently.
# =============================================================================
name: Gitgram Tests
on:
push:
branches: [main]
paths:
- "gitgram/**"
- ".github/workflows/gitgram-tests.yml"
pull_request:
paths:
- "gitgram/**"
- ".github/workflows/gitgram-tests.yml"
env:
NODE_VERSION: "20"
jobs:
# ---------------------------------------------------------------------------
# Backend - Jest against live Postgres + Redis.
# ---------------------------------------------------------------------------
backend:
name: "Test: Gitgram Backend (Jest)"
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
defaults:
run:
working-directory: gitgram/backend
services:
postgres:
image: postgres:16
env:
POSTGRES_PASSWORD: test
POSTGRES_DB: gitgram_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis:7
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Cache npm dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: npm-gitgram-backend-${{ hashFiles('gitgram/backend/package-lock.json') }}
restore-keys: npm-gitgram-backend-
- name: Install dependencies
run: npm ci --legacy-peer-deps
- name: Generate Prisma client
run: npm run prisma:generate
- name: Run Jest suites
run: npm run test:coverage -- --forceExit
env:
DATABASE_URL: postgresql://postgres:test@localhost:5432/gitgram_test
REDIS_URL: redis://localhost:6379
NODE_ENV: test
- name: Upload backend coverage
if: always()
uses: actions/upload-artifact@v4
with:
name: gitgram-backend-coverage
path: gitgram/backend/coverage/**
if-no-files-found: ignore
retention-days: 7
# ---------------------------------------------------------------------------
# Backend - E2E suite against live Postgres + Redis (real app, no mocks).
# Walks critical user flows (auth, posts, snippets, system wiring) over HTTP.
# ---------------------------------------------------------------------------
backend-e2e:
name: "E2E: Gitgram Backend (Jest + supertest)"
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
defaults:
run:
working-directory: gitgram/backend
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: gitgram_test
POSTGRES_PASSWORD: gitgram_test
POSTGRES_DB: gitgram_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis:7
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Cache npm dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: npm-gitgram-backend-${{ hashFiles('gitgram/backend/package-lock.json') }}
restore-keys: npm-gitgram-backend-
- name: Install dependencies
run: npm ci --legacy-peer-deps
- name: Generate Prisma client
run: npm run prisma:generate
- name: Run E2E suite
run: npm run test:e2e
env:
DATABASE_URL: postgresql://gitgram_test:gitgram_test@localhost:5432/gitgram_test
REDIS_URL: redis://localhost:6379
NODE_ENV: test
AI_ANALYSIS_ENABLED: "false"
DISABLE_RATE_LIMIT: "true"
# ---------------------------------------------------------------------------
# Web - TypeScript type checking.
# ---------------------------------------------------------------------------
web-typecheck:
name: "Typecheck: Gitgram Web"
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
defaults:
run:
working-directory: gitgram/web
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Cache npm dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: npm-gitgram-web-${{ hashFiles('gitgram/web/package-lock.json') }}
restore-keys: npm-gitgram-web-
- name: Install dependencies
run: npm ci --legacy-peer-deps
- name: Typecheck web
run: npx tsc --noEmit
# ---------------------------------------------------------------------------
# Web - Playwright smoke (chromium, navigation flow only).
# ---------------------------------------------------------------------------
web-e2e-smoke:
name: "E2E Smoke: Gitgram Web (Playwright)"
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
defaults:
run:
working-directory: gitgram/web
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Cache npm dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: npm-gitgram-web-${{ hashFiles('gitgram/web/package-lock.json') }}
restore-keys: npm-gitgram-web-
- name: Install dependencies
run: npm ci --legacy-peer-deps
- name: Install Playwright browsers (chromium)
run: npx playwright install --with-deps chromium
- name: Run Playwright smoke (navigation)
run: npx playwright test e2e/navigation.spec.ts --project=chromium
env:
CI: "true"
- name: Upload Playwright report
if: always()
uses: actions/upload-artifact@v4
with:
name: gitgram-web-playwright-report
path: gitgram/web/playwright-report/**
if-no-files-found: ignore
retention-days: 7