fix: persist setup wizard choice commits (#34) #59
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: Check | |
| on: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| env: | |
| DAYTONA_API_KEY: ${{ secrets.DAYTONA_API_KEY }} | |
| DAYTONA_API_URL: ${{ vars.DAYTONA_API_URL }} | |
| OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }} | |
| jobs: | |
| Check: | |
| name: Check | |
| runs-on: blacksmith-2vcpu-ubuntu-2404 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.10 | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Biome check | |
| run: bun run check | |
| - name: TypeScript typecheck | |
| run: bun run typecheck | |
| - name: Unit tests | |
| run: bun test | |
| - name: CLI smoke checks | |
| run: | | |
| bun src/sandcode.ts --help | |
| bun src/sandcode.ts analyze --help | |
| bun src/sandcode.ts start --help | |
| bun src/sandcode.ts setup --help | |
| BuildPackage: | |
| name: Build Package Artifact | |
| runs-on: blacksmith-2vcpu-ubuntu-2404 | |
| needs: Check | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.10 | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Build package | |
| run: bun run build | |
| - name: Pack tarball | |
| run: | | |
| mkdir -p artifacts | |
| npm pack --pack-destination artifacts | |
| ls -la artifacts | |
| - name: Upload package artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: npm-package | |
| path: artifacts/*.tgz | |
| if-no-files-found: error | |
| PackageE2E: | |
| name: Package Install E2E | |
| runs-on: blacksmith-2vcpu-ubuntu-2404 | |
| needs: BuildPackage | |
| steps: | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.10 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Download package artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: npm-package | |
| path: artifacts | |
| - name: Install package into clean project | |
| run: | | |
| mkdir e2e-install | |
| cd e2e-install | |
| npm init -y | |
| npm install ../artifacts/*.tgz | |
| - name: Run installed CLI binary | |
| run: | | |
| cd e2e-install | |
| ./node_modules/.bin/sandcode --help | |
| ./node_modules/.bin/sandcode analyze --help | |
| ./node_modules/.bin/sandcode start --help | |
| ./node_modules/.bin/sandcode setup --help | |
| - name: Run installed setup smoke | |
| run: | | |
| cd e2e-install | |
| mkdir -p home-smoke/vaults/test | |
| HOME="$PWD/home-smoke" ./node_modules/.bin/sandcode setup --yes \ | |
| --vault-path ~/vaults/test \ | |
| --obsidian-integration desktop \ | |
| --notes-root Research/Sandcode \ | |
| --catalog-mode repo \ | |
| --daytona-api-key daytona-test \ | |
| --opencode-api-key opencode-test | |
| test -f home-smoke/.config/sandcode/sandcode.toml | |
| test -f home-smoke/.config/sandcode/.env | |
| - name: Run installed setup TUI smoke | |
| run: | | |
| cd e2e-install | |
| mkdir -p logs | |
| status=0 | |
| timeout 5s script -qefc './node_modules/.bin/sandcode setup' logs/setup-tui.log || status=$? | |
| if [ "$status" -ne 0 ] && [ "$status" -ne 124 ]; then | |
| cat logs/setup-tui.log | |
| exit "$status" | |
| fi | |
| grep -q 'sandcode' logs/setup-tui.log | |
| ! grep -q 'Orphan text error' logs/setup-tui.log | |
| ! grep -q 'dispose is not a function' logs/setup-tui.log |