Add versioned Lucid Agents skill with drift-resistant CI #1904
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 | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| env: | |
| BUN_VERSION: 1.3.10 | |
| jobs: | |
| static_checks: | |
| name: Build, types, lint, and format | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: ${{ env.BUN_VERSION }} | |
| - run: bun install --frozen-lockfile | |
| - run: bun run build:packages | |
| - run: bun run type-check | |
| - run: bun run deadcode | |
| - run: bun run lint | |
| - run: bun run format:check | |
| tests: | |
| name: Unit and integration tests with coverage | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 25 | |
| services: | |
| postgres: | |
| image: postgres:16-alpine | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: test_password | |
| POSTGRES_DB: lucid_agents_test | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd "pg_isready -U postgres -d lucid_agents_test" | |
| --health-interval 5s | |
| --health-timeout 5s | |
| --health-retries 12 | |
| env: | |
| TEST_POSTGRES_URL: postgresql://postgres:test_password@localhost:5432/lucid_agents_test | |
| TEST_DATABASE_URL: postgresql://postgres:test_password@localhost:5432/lucid_agents_test | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: ${{ env.BUN_VERSION }} | |
| - run: bun install --frozen-lockfile | |
| - run: bun run build:packages | |
| - name: Run the zero-skip coverage gate | |
| run: | | |
| mkdir -p reports | |
| bun run test:ci | |
| - name: Upload test and coverage reports | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-and-coverage-reports | |
| path: | | |
| reports/junit.xml | |
| coverage/lcov.info | |
| if-no-files-found: warn | |
| examples_e2e: | |
| name: Kitchen sink and examples E2E | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: ${{ env.BUN_VERSION }} | |
| - run: bun install --frozen-lockfile | |
| - run: bun run build:packages | |
| - run: bun run test:e2e | |
| generated_projects: | |
| name: Generated ${{ matrix.adapter }} / ${{ matrix.preset }} project | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - { adapter: hono, preset: dossier } | |
| - { adapter: hono, preset: folio } | |
| - { adapter: hono, preset: console } | |
| - { adapter: express, preset: dossier } | |
| - { adapter: express, preset: folio } | |
| - { adapter: express, preset: console } | |
| - { adapter: tanstack-ui, preset: dossier } | |
| - { adapter: tanstack-ui, preset: folio } | |
| - { adapter: tanstack-ui, preset: console } | |
| - { adapter: next, preset: dossier } | |
| - { adapter: next, preset: folio } | |
| - { adapter: next, preset: console } | |
| - { adapter: tanstack-headless, preset: none } | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: ${{ env.BUN_VERSION }} | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - run: bun install --frozen-lockfile | |
| - run: bun run build:packages | |
| - run: bun run --cwd packages/cli build | |
| - run: bun run scripts/test-generated-project.ts ${{ matrix.adapter }} ${{ matrix.preset }} | |
| browser_smoke: | |
| name: Chromium landing-page smoke | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: ${{ env.BUN_VERSION }} | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - run: bun install --frozen-lockfile | |
| - run: bun run build:packages | |
| - name: Install Chromium | |
| run: npx --yes --package @playwright/cli@0.1.17 playwright-cli install-browser chromium | |
| - run: bun run test:browser | |
| - name: Upload browser diagnostics | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: browser-smoke-artifacts | |
| path: output/playwright | |
| if-no-files-found: warn | |
| runtime_compatibility: | |
| name: Node ${{ matrix.node-version }} and edge-like imports | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| strategy: | |
| matrix: | |
| node-version: [20, 22] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: ${{ env.BUN_VERSION }} | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - run: bun install --frozen-lockfile | |
| - run: bun run build:packages | |
| - run: bun run test:portability | |
| skill_integrity: | |
| name: Agent Skill integrity and drift | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: ${{ env.BUN_VERSION }} | |
| - name: Validate canonical, immutable snapshots, and source commits | |
| run: bun run skill:validate | |
| - name: Test inspector, packaging, install contract, and eval harness | |
| run: bun run skill:test | |
| - name: Prepare provider-neutral behavioral eval packets | |
| run: | | |
| mkdir -p reports | |
| bun run skill:eval:prepare > reports/lucid-skill-evals.jsonl | |
| test "$(wc -l < reports/lucid-skill-evals.jsonl | tr -d ' ')" = "8" | |
| - name: Build and verify public skill assets | |
| run: | | |
| bun run skill:assets | |
| skill_version="$(tr -d '\n' < .agents/skills/lucid-agents/VERSION)" | |
| skill_assets="lucid-docs/public/skills/lucid-agents" | |
| skill_extract="$(mktemp -d)" | |
| (cd "$skill_assets/$skill_version" && sha256sum -c lucid-agents.tar.gz.sha256) | |
| tar -xzf "$skill_assets/$skill_version/lucid-agents.tar.gz" -C "$skill_extract" | |
| diff -qr "skill-releases/lucid-agents/$skill_version" "$skill_extract/lucid-agents" | |
| cmp "$skill_assets/lucid-agents.tar.gz" "$skill_assets/$skill_version/lucid-agents.tar.gz" | |
| cmp "$skill_assets/manifest.json" "$skill_assets/$skill_version/manifest.json" | |
| cmp "$skill_assets/install.sh" "$skill_assets/$skill_version/install.sh" | |
| sh -n "$skill_assets/install.sh" | |
| grep -F "/skills/lucid-agents/$skill_version/*" lucid-docs/public/_headers | |
| - name: Upload generated skill distribution | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: lucid-agents-skill-distribution | |
| path: | | |
| lucid-docs/public/skills/lucid-agents | |
| reports/lucid-skill-evals.jsonl | |
| if-no-files-found: error | |
| docs: | |
| name: Documentation contracts and build | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: ${{ env.BUN_VERSION }} | |
| - run: bun install --frozen-lockfile | |
| - run: bun run build:packages | |
| - name: Test documentation content and drift contracts | |
| run: bun run test:docs | |
| - run: bun run --cwd lucid-docs types:check | |
| - run: bun run test:docs-stable | |
| - run: bun run --cwd lucid-docs build |