Ask AI: migrate to Kapa Agent SDK — tools, saved history, sign-in gate #1139
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
| --- | |
| # This workflow makes sure that the UI builds without errors. | |
| # The push:[main] trigger also warms the branch-scoped node_modules cache on | |
| # every merge, so tag-triggered publish-release runs can restore it (caches are | |
| # only restorable from the same ref or the default branch). | |
| name: validate-build | |
| on: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: stable | |
| cache-dependency-path: blobl-editor/wasm/go.sum | |
| - name: Lint Go code | |
| uses: golangci/golangci-lint-action@v8 | |
| timeout-minutes: 10 | |
| with: | |
| working-directory: "./blobl-editor/wasm" | |
| env: | |
| GOOS: js | |
| GOARCH: wasm | |
| - name: Ensure wasm_exec.js is up to date | |
| run: | | |
| diff -q $(go env GOROOT)/lib/wasm/wasm_exec.js ./src/js/vendor/wasm_exec.js &>/dev/null || { >&2 echo "Stale wasm_exec.js detected."; exit 1; } | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18 | |
| - name: Cache node_modules | |
| id: cache-node-modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: node_modules | |
| key: node-modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }} | |
| - name: Install dependencies | |
| if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
| run: npm ci | |
| - name: Cache generated files | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| src/js/vendor/prism/prism-bloblang.js | |
| src/static/blobl.wasm | |
| key: generated-${{ hashFiles('blobl-editor/wasm/go.sum') }}-${{ hashFiles('package-lock.json') }} | |
| restore-keys: | | |
| generated-${{ hashFiles('blobl-editor/wasm/go.sum') }}- | |
| generated- | |
| - name: Bundle UI | |
| timeout-minutes: 10 | |
| run: gulp bundle |