refactor: vendor guard — shared walk helper, isolated extra-file nega… #11
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 | |
| # v1.0.3 Fix 5: every push to main and every PR must pass the full local | |
| # check battery before merging: frontend build, embedded dist sync, gofmt, | |
| # go vet, go test. | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| checks: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 # current stable LTS for Vite 5 | |
| cache: npm | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Install frontend dependencies (npm ci) | |
| working-directory: frontend | |
| run: npm ci | |
| - name: Build frontend (tsc --noEmit + vite build) | |
| working-directory: frontend | |
| run: npm run build | |
| - name: Frontend unit tests (vitest — product tour logic) | |
| working-directory: frontend | |
| run: npm test | |
| # The Go binary embeds internal/webui/dist; it must always match the | |
| # React source in the same commit, or a shipped binary silently keeps | |
| # the old UI. | |
| - name: Verify embedded dist matches frontend source | |
| run: | | |
| rm -rf internal/webui/dist | |
| cp -R frontend/dist internal/webui/dist | |
| if ! git diff --exit-code -- internal/webui/dist; then | |
| echo "::error::frontend source and committed internal/webui/dist are out of sync — run 'make frontend-build' and commit the result" | |
| exit 1 | |
| fi | |
| - name: gofmt check (never scan .tools/) | |
| run: test -z "$(gofmt -l cmd internal scripts)" | |
| - name: go vet | |
| run: go vet ./... | |
| - name: go test | |
| run: go test ./... | |
| # v1.0.5: the vendored light-kanban-worker Skill snapshot must match | |
| # skills/manifest.json (SHA-256 pinned from the upstream | |
| # LightDevCoder/skills release tag); the script self-test exercises | |
| # positive and negative fixtures. | |
| - name: Verify vendored Worker Skill snapshot | |
| run: | | |
| node scripts/verify-vendored-skill.cjs | |
| node scripts/verify-vendored-skill.cjs --self-test |