Convert gitgram/ and aitimemachine/ from embedded git repos (which showed as opaque submodule gitlinks on GitHub) into fully-tracked first-party content. AITM now merges its 7 vendored repos as first-party engines: - memory: beads (Go task DAG) + context7 (docs SDK), unified into saved_contexts - git: vendored C git (bundled binary) + gitnexus (in-process code intelligence) - agentic: a2a (@a2a-js/sdk) + pal (AITM-managed Python subprocess) Includes the full session's product build: Gitgram web/mobile/backend features, AITM website/CLI/MCP, the unified memory layer, engine build tooling (scripts/build-engines.sh, Dockerfile, CI), docs (README, ENGINES.md, ARCHITECTURE.md), and extensive test suites. Build artifacts, node_modules, external/, and gemini-cli are gitignored. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
113 lines
3.3 KiB
YAML
113 lines
3.3 KiB
YAML
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
|
|
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
|
|
|
|
name: Run Unit Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main", "epic/**" ]
|
|
pull_request:
|
|
branches: [ "main", "epic/**" ]
|
|
paths-ignore:
|
|
- '**.md'
|
|
- 'LICENSE'
|
|
- '.github/CODEOWNERS'
|
|
- 'src/samples/**'
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
strategy:
|
|
matrix:
|
|
node-version: [18, 20, 22, 24]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
registry-url: 'https://registry.npmjs.org'
|
|
cache: 'npm'
|
|
- run: npm ci
|
|
- run: npm test
|
|
|
|
# Edge runtime tests use @edge-runtime/vm to emulate Cloudflare Workers,
|
|
# Vercel Edge Functions, and similar environments. This ensures the SDK
|
|
# works correctly in non-Node.js server environments.
|
|
test-edge:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 24
|
|
registry-url: 'https://registry.npmjs.org'
|
|
cache: 'npm'
|
|
- run: npm ci
|
|
- run: npm run test:edge
|
|
|
|
# The vitest 4.0.x test coverage integration doesn't support Node 18,
|
|
# Node 18 has reached EOL already, however for compatibility we're still going to run tests
|
|
# for Node 18 until the next major release (see https://github.com/a2aproject/a2a-js/pull/256).
|
|
# Run coverage only once on a modern node to generate a report to avoid downgrading vitest.
|
|
coverage:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Base Branch
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ github.event.pull_request.base.ref || 'main' }}
|
|
clean: true
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 24
|
|
cache: 'npm'
|
|
|
|
- name: Install & Test (Base Branch)
|
|
timeout-minutes: 10
|
|
run: |
|
|
npm ci
|
|
npm run coverage
|
|
mv coverage/coverage-summary.json ${{ runner.temp }}/coverage-base-summary.json
|
|
|
|
- name: Upload Artifact (base)
|
|
uses: actions/upload-artifact@v4
|
|
if: github.event_name != 'pull_request'
|
|
with:
|
|
name: coverage-report
|
|
path: coverage
|
|
retention-days: 14
|
|
|
|
- name: Checkout PR Branch
|
|
if: github.event_name == 'pull_request'
|
|
uses: actions/checkout@v4
|
|
with:
|
|
clean: true
|
|
|
|
- name: Install & Test (PR)
|
|
if: github.event_name == 'pull_request'
|
|
timeout-minutes: 10
|
|
run: |
|
|
npm ci
|
|
npm run coverage
|
|
mv coverage/coverage-summary.json coverage-pr-summary.json
|
|
mv ${{ runner.temp }}/coverage-base-summary.json coverage-base-summary.json
|
|
|
|
- name: Save PR number
|
|
run: |
|
|
echo ${{ github.event.number }} > ./PR_NUMBER
|
|
|
|
- name: Upload Coverage Artifacts
|
|
uses: actions/upload-artifact@v4
|
|
if: github.event_name == 'pull_request'
|
|
with:
|
|
name: coverage-data
|
|
path: |
|
|
coverage-base-summary.json
|
|
coverage-pr-summary.json
|
|
coverage/
|
|
PR_NUMBER
|
|
retention-days: 1
|