chore(ask): rebuild the search index so docs:check passes again #63
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ═══════════════════════════════════════════════════════════════════════════════ | |
| # XActions CI — Tests + Lint on every push/PR | |
| # by nichxbt | |
| # ═══════════════════════════════════════════════════════════════════════════════ | |
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: Test (Node ${{ matrix.node-version }}) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| services: | |
| postgres: | |
| image: postgres:16-alpine | |
| env: | |
| POSTGRES_USER: xactions | |
| POSTGRES_PASSWORD: test_password | |
| POSTGRES_DB: xactions_test | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5432:5432 | |
| redis: | |
| image: redis:7-alpine | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 6379:6379 | |
| env: | |
| NODE_ENV: test | |
| DATABASE_URL: postgresql://xactions:test_password@localhost:5432/xactions_test?schema=public | |
| JWT_SECRET: ci-test-jwt-secret-not-for-production | |
| SESSION_SECRET: ci-test-session-secret | |
| REDIS_HOST: localhost | |
| REDIS_PORT: 6379 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # engines.node says >=20, so prove it on the floor and on what | |
| # people actually run. A test that only ever sees 20 is a claim, | |
| # not a guarantee. | |
| node-version: [20, 22, 24] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Generate Prisma client | |
| run: npx prisma generate | |
| - name: Run database migrations | |
| run: npx prisma migrate deploy | |
| continue-on-error: true | |
| - name: Push schema (fallback) | |
| run: npx prisma db push --skip-generate | |
| if: failure() | |
| - name: Run tests | |
| run: npm test | |
| - name: Report coverage | |
| if: matrix.node-version == 20 | |
| run: npm run test:coverage | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run ESLint | |
| run: npm run lint | |
| build: | |
| name: Build Check | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Generate Prisma client | |
| run: npx prisma generate | |
| - name: Syntax check (server) | |
| run: node -c api/server.js | |
| - name: Syntax check (CLI) | |
| run: node -c src/cli/index.js | |
| - name: Syntax check (MCP) | |
| run: node -c src/mcp/server.js | |
| - name: Syntax check (examples) | |
| run: for f in examples/*.js; do node -c "$f"; done | |
| docs: | |
| name: Documentation | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| # Needs no dependencies: the auditor is dependency-free by design so a | |
| # broken link fails in seconds rather than after a full install. | |
| - name: Audit documentation | |
| run: npm run docs:check | |
| docker: | |
| name: Docker Build | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build Docker image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| push: false | |
| tags: xactions:latest | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max |