fix: update Node requirement to >=20 and sync package-lock #3
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: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [20, 22] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup 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 | |
| run: npm run build | |
| - name: Type check | |
| run: npm run typecheck | |
| - name: Test | |
| run: npm test | |
| # Verify the plugin structure is correct | |
| verify-plugin: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build | |
| run: npm run build | |
| - name: Verify plugin structure | |
| run: | | |
| echo "Checking plugin structure..." | |
| test -d dist || (echo "Missing dist directory" && exit 1) | |
| test -f dist/index.js || (echo "Missing dist/index.js" && exit 1) | |
| test -f dist/index.d.ts || (echo "Missing dist/index.d.ts" && exit 1) | |
| test -f dist/plugin.js || (echo "Missing dist/plugin.js" && exit 1) | |
| test -d .opencode || (echo "Missing .opencode directory" && exit 1) | |
| test -d .opencode/commands || (echo "Missing .opencode/commands" && exit 1) | |
| test -d .opencode/skills || (echo "Missing .opencode/skills" && exit 1) | |
| test -f opencodeBrain-banner.png || (echo "Missing banner image" && exit 1) | |
| echo "Plugin structure verified!" |