feat: runtime skill discovery — REST API, MCP server, cache, ranking,… #289
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: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| # Verify all packages have consistent versions | |
| version-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Check version consistency | |
| run: | | |
| echo "Checking version consistency across all packages..." | |
| # Get the main version from apps/skillkit | |
| MAIN_VERSION=$(node -p "require('./apps/skillkit/package.json').version") | |
| echo "Main version: $MAIN_VERSION" | |
| # List of all packages to check | |
| PACKAGES=( | |
| "package.json" | |
| "apps/skillkit/package.json" | |
| "packages/cli/package.json" | |
| "packages/core/package.json" | |
| "packages/tui/package.json" | |
| "packages/agents/package.json" | |
| "packages/memory/package.json" | |
| "packages/mesh/package.json" | |
| "packages/messaging/package.json" | |
| "packages/mcp-memory/package.json" | |
| "packages/resources/package.json" | |
| "docs/skillkit/package.json" | |
| "docs/fumadocs/package.json" | |
| ) | |
| FAILED=0 | |
| for pkg in "${PACKAGES[@]}"; do | |
| if [ -f "$pkg" ]; then | |
| PKG_VERSION=$(node -p "require('./$pkg').version") | |
| if [ "$PKG_VERSION" != "$MAIN_VERSION" ]; then | |
| echo "❌ Version mismatch: $pkg has $PKG_VERSION (expected $MAIN_VERSION)" | |
| FAILED=1 | |
| else | |
| echo "✓ $pkg: $PKG_VERSION" | |
| fi | |
| fi | |
| done | |
| if [ $FAILED -eq 1 ]; then | |
| echo "" | |
| echo "Version mismatch detected!" | |
| echo "Run: ./scripts/bump-version.sh $MAIN_VERSION" | |
| exit 1 | |
| fi | |
| echo "" | |
| echo "All packages have consistent version: $MAIN_VERSION" | |
| # Unit tests run on all Node versions | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [18, 20, 22] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Type check | |
| run: pnpm typecheck | |
| - name: Build | |
| run: pnpm build | |
| - name: Unit Tests | |
| run: pnpm test | |
| # E2E tests run on latest Node only (to save CI time) | |
| e2e: | |
| runs-on: ubuntu-latest | |
| needs: test # Run after unit tests pass | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Use Node.js 22 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build | |
| run: pnpm build | |
| - name: E2E Tests | |
| run: pnpm test:e2e | |
| - name: Upload E2E Test Results | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: e2e-test-results | |
| path: | | |
| e2e/**/*.log | |
| /tmp/skillkit-e2e-* | |
| retention-days: 7 | |
| # Final status check for branch protection | |
| ci-success: | |
| runs-on: ubuntu-latest | |
| needs: [version-check, test, e2e] | |
| if: always() | |
| steps: | |
| - name: Check all jobs passed | |
| run: | | |
| if [[ "${{ needs.version-check.result }}" != "success" ]] || \ | |
| [[ "${{ needs.test.result }}" != "success" ]] || \ | |
| [[ "${{ needs.e2e.result }}" != "success" ]]; then | |
| echo "One or more jobs failed" | |
| exit 1 | |
| fi | |
| echo "All CI checks passed!" |