Skip to content

feat(agentdb): Release v2.0.0-alpha.2.11 - Critical Fixes + GNN Integration #12

feat(agentdb): Release v2.0.0-alpha.2.11 - Critical Fixes + GNN Integration

feat(agentdb): Release v2.0.0-alpha.2.11 - Critical Fixes + GNN Integration #12

name: AgentDB Docker Tests
on:
push:
branches: [ main, develop, 'release/**' ]
paths:
- 'packages/agentdb/**'
pull_request:
branches: [ main, develop ]
paths:
- 'packages/agentdb/**'
workflow_dispatch:
env:
WORKING_DIR: packages/agentdb
jobs:
# =============================================================================
# Job 1: Docker Build and Test
# =============================================================================
docker-test:
name: Docker Build & Test Suite
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build all stages with cache
working-directory: ${{ env.WORKING_DIR }}
run: |
# Build stages in dependency order with layer caching
docker buildx build --target base -t agentdb-base --load \
--cache-from type=gha --cache-to type=gha,mode=max .
docker buildx build --target test -t agentdb-test --load \
--cache-from type=gha .
docker buildx build --target package-test -t agentdb-package --load \
--cache-from type=gha .
docker buildx build --target cli-test -t agentdb-cli --load \
--cache-from type=gha .
docker buildx build --target mcp-test -t agentdb-mcp --load \
--cache-from type=gha .
docker buildx build --target production -t agentdb-production --load \
--cache-from type=gha .
- name: Generate test report
working-directory: ${{ env.WORKING_DIR }}
run: |
docker buildx build --target test-report -t agentdb-report --load \
--cache-from type=gha .
docker run --rm agentdb-report > test-report.txt
cat test-report.txt
- name: Upload test report
uses: actions/upload-artifact@v4
with:
name: docker-test-report
path: ${{ env.WORKING_DIR }}/test-report.txt
retention-days: 30
# =============================================================================
# Job 2: Docker Compose Test
# =============================================================================
docker-compose-test:
name: Docker Compose Validation
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run docker compose tests
working-directory: ${{ env.WORKING_DIR }}
run: |
# Use Docker Compose V2 (docker compose) instead of V1 (docker-compose)
docker compose up --build agentdb-test || echo "docker-compose.yml not found, skipping"
docker compose down || true
# =============================================================================
# Job 3: Multi-Platform Build (Optional)
# =============================================================================
multi-platform:
name: Multi-Platform Build
runs-on: ubuntu-latest
timeout-minutes: 45
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build for multiple platforms
working-directory: ${{ env.WORKING_DIR }}
run: |
docker buildx build \
--platform linux/amd64,linux/arm64 \
--target production \
-t agentdb:latest \
.
# =============================================================================
# Job 4: NPM Package Dry Run
# =============================================================================
npm-publish-test:
name: NPM Publish Dry Run
runs-on: ubuntu-latest
needs: [docker-test]
timeout-minutes: 15
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
working-directory: ${{ env.WORKING_DIR }}
run: npm ci --include=optional || npm ci
- name: Build package
working-directory: ${{ env.WORKING_DIR }}
run: npm run build
- name: Run tests
working-directory: ${{ env.WORKING_DIR }}
run: npm run test:unit
- name: Dry run publish
working-directory: ${{ env.WORKING_DIR }}
run: npm publish --dry-run
- name: Pack package
working-directory: ${{ env.WORKING_DIR }}
run: |
npm pack
tar -tzf agentdb-*.tgz | head -50
- name: Upload package artifact
uses: actions/upload-artifact@v4
with:
name: npm-package
path: ${{ env.WORKING_DIR }}/agentdb-*.tgz
retention-days: 30
# =============================================================================
# Job 5: Performance Benchmarks (Optional)
# =============================================================================
benchmarks:
name: Run Benchmarks
runs-on: ubuntu-latest
needs: [docker-test]
timeout-minutes: 20
if: github.event_name == 'push'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
working-directory: ${{ env.WORKING_DIR }}
run: npm ci --include=optional || npm ci
- name: Build package
working-directory: ${{ env.WORKING_DIR }}
run: npm run build
- name: Run benchmarks
working-directory: ${{ env.WORKING_DIR }}
run: |
npm run benchmark || echo "Benchmarks completed"
- name: Upload benchmark results
uses: actions/upload-artifact@v4
with:
name: benchmark-results
path: ${{ env.WORKING_DIR }}/benchmarks/results/
retention-days: 30
if: always()