docs: add PR submission guide (#2) #7
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: | |
| lint-and-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: Run syntax check | |
| run: npm run prepare | |
| - name: Check for syntax errors in all JS files | |
| run: | | |
| for file in $(find src bin -name "*.js"); do | |
| echo "Checking $file..." | |
| node -c "$file" | |
| done | |
| - name: Verify proto.js exports | |
| run: | | |
| node -e "const proto = require('./src/proto.js'); \ | |
| console.log('Exported functions:', Object.keys(proto)); \ | |
| if (!proto.protoApply || !proto.protoInit) { \ | |
| throw new Error('Missing required exports'); \ | |
| }" |