Repository navigation
Merge pull request #2 from techninja/scaffolder #9
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: Spec Check | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| spec: | |
| name: Full Spec Compliance | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - run: npm ci | |
| - name: Install Playwright Chromium | |
| run: npx playwright install chromium --with-deps | |
| - name: Code line counts (≤150) | |
| run: node scripts/spec.js code | |
| - name: Doc line counts (≤500) | |
| run: node scripts/spec.js docs | |
| - name: ESLint | |
| run: npx eslint --config .configs/eslint.config.js . | |
| - name: Prettier | |
| run: npx prettier --config .configs/.prettierrc --check src scripts tests | |
| - name: JSDoc types (tsc --checkJs) | |
| run: | | |
| OUTPUT=$(npx tsc --project .configs/jsconfig.json 2>&1 || true) | |
| ERRORS=$(echo "$OUTPUT" | grep -v node_modules | grep error || true) | |
| if [ -n "$ERRORS" ]; then echo "$ERRORS"; exit 1; fi | |
| - name: Node tests | |
| run: node --test tests/*.test.js src/utils/*.test.js src/store/*.test.js | |
| - name: Browser tests | |
| run: npx web-test-runner --config .configs/web-test-runner.config.js |