v2.1.0 — the model catalog is models.dev, and a new chat writes again #4
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: | |
| env: | |
| BUN_VERSION: "1.3.14" | |
| jobs: | |
| check: | |
| name: check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: ${{ env.BUN_VERSION }} | |
| - run: bun install --frozen-lockfile | |
| - name: Typecheck | |
| run: bun run typecheck | |
| - name: Test | |
| run: bun test | |
| # src/server/webdist.ts is a committed build artefact, which leaves | |
| # one failure mode: edit web/src, forget to rebuild, ship a binary | |
| # serving the previous UI. This compares a hash of the sources | |
| # against the one recorded at embed time. | |
| - name: The embedded UI matches web/src | |
| run: bun run hash:check | |
| compile: | |
| name: compile | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: ${{ env.BUN_VERSION }} | |
| - run: bun install --frozen-lockfile | |
| # Every target has to compile here. sqlbot ships five from one host, | |
| # so a target that only breaks at release time is a target nobody | |
| # finds until the release is already tagged. | |
| - name: Compile every target | |
| run: bun build-bin.ts --all | |
| - name: It runs and serves | |
| run: | | |
| mkdir -p /tmp/smoke && tar -xzf dist/bin/sqlbot-linux-x64.tar.gz -C /tmp/smoke | |
| bin=/tmp/smoke/linux-x64/sqlbot | |
| "$bin" --help > /dev/null | |
| SQLBOT_CONFIG_DIR=/tmp/smoke-home "$bin" --port 1121 --no-open > /tmp/smoke.log 2>&1 & | |
| for _ in $(seq 1 45); do | |
| curl -fsS -o /dev/null http://127.0.0.1:1121/ && break | |
| sleep 1 | |
| done | |
| health="$(curl -s http://127.0.0.1:1121/api/health || true)" | |
| echo "health -> $health" | |
| pkill -f "$bin" || true | |
| case "$health" in *'"database":"ok"'*) ;; | |
| *) echo "✗ did not start"; cat /tmp/smoke.log; exit 1 ;; esac | |
| web: | |
| name: web | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: ${{ env.BUN_VERSION }} | |
| # The UI must build from web/'s own dependencies. It borrowed the | |
| # parent's node_modules once during the port and would have failed | |
| # on any other machine. | |
| - name: Build the UI | |
| run: | | |
| cd web && bun install --frozen-lockfile && bun run build | |
| test -f dist/index.html | |
| installers: | |
| name: installers | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Shell syntax | |
| run: bash -n install.sh | |
| - name: PowerShell syntax | |
| shell: pwsh | |
| run: | | |
| $errors = $null | |
| [System.Management.Automation.Language.Parser]::ParseFile( | |
| "install.ps1", [ref]$null, [ref]$errors) | Out-Null | |
| if ($errors) { $errors; exit 1 } |