docs: Update README with AgentDB v2 and publish alpha.2.7 #1
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: 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 base stage | |
| working-directory: ${{ env.WORKING_DIR }} | |
| run: | | |
| docker build --target base -t agentdb-base . | |
| - name: Build and run tests | |
| working-directory: ${{ env.WORKING_DIR }} | |
| run: | | |
| docker build --target test -t agentdb-test . | |
| - name: Validate package | |
| working-directory: ${{ env.WORKING_DIR }} | |
| run: | | |
| docker build --target package-test -t agentdb-package . | |
| - name: Test CLI | |
| working-directory: ${{ env.WORKING_DIR }} | |
| run: | | |
| docker build --target cli-test -t agentdb-cli . | |
| - name: Test MCP server | |
| working-directory: ${{ env.WORKING_DIR }} | |
| run: | | |
| docker build --target mcp-test -t agentdb-mcp . | |
| - name: Build production image | |
| working-directory: ${{ env.WORKING_DIR }} | |
| run: | | |
| docker build --target production -t agentdb-production . | |
| - name: Generate test report | |
| working-directory: ${{ env.WORKING_DIR }} | |
| run: | | |
| docker build --target test-report -t agentdb-report . | |
| 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: | | |
| docker-compose up --build agentdb-test | |
| docker-compose down | |
| # ============================================================================= | |
| # 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() |