feat: Grok Build / xAI provider with device login + API key #158
Workflow file for this run
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
| name: CI | |
| # Runs on pull requests targeting main. Making this a required status check in | |
| # branch protection (see RELEASE.md) is what prevents merging/pushing to main until | |
| # CI is green. | |
| on: | |
| pull_request: | |
| branches: [main] | |
| # Cancel superseded runs on the same ref. | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| versions: | |
| name: version sync | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: '22' | |
| - name: Check all components match the root VERSION file | |
| run: node scripts/sync-version.mjs --check | |
| cli: | |
| name: CLI | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: '22' | |
| - run: node --test scripts/kritt.test.mjs scripts/kritt-ui.test.mjs scripts/kritt-headless.test.mjs | |
| docs: | |
| name: docs (links and redirects) | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: docs-site | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: '22' | |
| - run: npm run check-links | |
| frontend: | |
| name: frontend (lint • build • test) | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: frontend | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: '22' | |
| - run: npm ci | |
| # Advisory until the one-time lint/format cleanup PR lands, then drop | |
| # continue-on-error to make these hard gates. | |
| - run: npm run lint | |
| continue-on-error: true | |
| - run: npm run format:check | |
| continue-on-error: true | |
| - run: npm run build | |
| - run: npm test | |
| - name: Build the Alpine frontend image | |
| run: docker build --tag open-kritt-frontend-ci . | |
| - name: Verify the Alpine image can load Rollup | |
| run: docker run --rm open-kritt-frontend-ci npm run build | |
| backend: | |
| name: backend (lint • test • prisma validate) | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: backend | |
| env: | |
| DATABASE_URL: postgresql://kritt:kritt@localhost:5432/kritt?schema=public | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: '22' | |
| - run: npm ci | |
| # Advisory until the one-time lint/format cleanup PR lands. | |
| - run: npm run lint | |
| continue-on-error: true | |
| - run: npm run format:check | |
| continue-on-error: true | |
| - run: npx prisma validate | |
| - run: npm test | |
| engine: | |
| name: engine (lint • image) | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: engine | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.11' | |
| - run: pip install ruff | |
| # Advisory until the one-time lint/format cleanup PR lands. | |
| - run: ruff check . | |
| continue-on-error: true | |
| - run: ruff format --check . | |
| continue-on-error: true | |
| - name: Build the engine image | |
| run: docker build --tag open-kritt-engine-ci . | |
| # TODO: re-enable the test suite. Several tests currently assume a writable | |
| # /root home (codex/claude dirs) and one has an outdated assertion, so they | |
| # fail on CI runners. Lint-only for now. | |
| # - run: pip install -r requirements.txt | |
| # - run: pytest | |
| database: | |
| name: database (migrations apply idempotently) | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| # Match the version the app ships (database/Dockerfile) for prod parity. | |
| image: postgres:16.4-alpine3.20 | |
| env: | |
| POSTGRES_USER: kritt | |
| POSTGRES_PASSWORD: kritt | |
| POSTGRES_DB: kritt | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd "pg_isready -U kritt" | |
| --health-interval 5s | |
| --health-timeout 5s | |
| --health-retries 10 | |
| env: | |
| DATABASE_URL: postgresql://kritt:kritt@localhost:5432/kritt?schema=public | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: '22' | |
| - name: Install backend deps + generate Prisma client | |
| working-directory: backend | |
| run: | | |
| npm ci | |
| npx prisma generate | |
| - name: Apply migrations | |
| working-directory: backend | |
| run: node prisma/migrate.js | |
| - name: Re-apply migrations (must be idempotent) | |
| working-directory: backend | |
| run: node prisma/migrate.js |