fix(test): update skills test after repo-ingestion removal #112
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] | |
| paths: | |
| - 'src/**' | |
| - 'scripts/**' | |
| - 'package.json' | |
| - 'package-lock.json' | |
| - 'tsconfig*.json' | |
| - 'esbuild.config.js' | |
| - 'vitest.config.ts' | |
| - '.github/workflows/test-shared-context.yml' | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - 'src/**' | |
| - 'scripts/**' | |
| - 'package.json' | |
| - 'package-lock.json' | |
| - 'tsconfig*.json' | |
| - 'esbuild.config.js' | |
| - 'vitest.config.ts' | |
| workflow_dispatch: | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [20.x, 22.x] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build project | |
| run: npm run build | |
| - name: Verify dist artifacts | |
| run: npm run verify:dist | |
| - name: Run lint | |
| run: npm run lint | |
| - name: Run all tests | |
| run: npm run test:run | |
| env: | |
| CI: true | |
| - name: Generate coverage (Node 20 only) | |
| if: matrix.node-version == '20.x' | |
| run: npm run test:run -- --coverage | |
| env: | |
| CI: true | |
| - name: Upload coverage reports to Codecov | |
| if: matrix.node-version == '20.x' | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./coverage/coverage-final.json | |
| flags: unit | |
| fail_ci_if_error: false | |
| verbose: true | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results-${{ matrix.node-version }} | |
| path: | | |
| coverage/ | |
| test-results/ | |
| integration: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.x | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build project | |
| run: npm run build | |
| - name: Verify dist artifacts | |
| run: npm run verify:dist | |
| - name: Test CLI integration | |
| run: | | |
| # Initialize test project | |
| mkdir -p /tmp/test-project | |
| cd /tmp/test-project | |
| npx stackmemory init | |
| # Test status command | |
| npx stackmemory status | |
| # Create test frames and sync | |
| echo "Testing shared context..." | npx stackmemory context push "Test Frame" --type task | |
| npx stackmemory context add decision "Use shared context for cross-session reference" | |
| # Verify context persistence | |
| npx stackmemory status --project | |
| - name: Verify shared context files | |
| run: | | |
| # Check if shared context directory exists | |
| if [ -d "$HOME/.stackmemory/shared-context" ]; then | |
| echo "Shared context directory exists" | |
| ls -la "$HOME/.stackmemory/shared-context/" | |
| else | |
| echo "Shared context directory not found" | |
| exit 1 | |
| fi |