Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,63 @@ jobs:

- name: Test
run: bun test

smoke-test:
name: Smoke Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.9
Comment thread
rsbh marked this conversation as resolved.

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Build CLI
run: bun run build:cli
working-directory: ./packages/chronicle

- name: Build example
run: ./packages/chronicle/bin/chronicle.js build --config examples/basic/chronicle.yaml
shell: bash

- name: Smoke test dev server
shell: bash
run: |
./packages/chronicle/bin/chronicle.js dev --config examples/basic/chronicle.yaml --port 3001 &
DEV_PID=$!
for i in $(seq 1 30); do
if curl -sf http://localhost:3001/api/health > /dev/null 2>&1; then
echo "Dev server ready"
break
fi
sleep 2
done
curl -sf http://localhost:3001/api/health | grep -q '"ok"'
echo "Dev server health check passed"
kill $DEV_PID 2>/dev/null || true

- name: Smoke test start server
shell: bash
run: |
./packages/chronicle/bin/chronicle.js start --config examples/basic/chronicle.yaml --port 3002 &
START_PID=$!
for i in $(seq 1 30); do
if curl -sf http://localhost:3002/api/health > /dev/null 2>&1; then
echo "Start server ready"
break
fi
sleep 2
done
curl -sf http://localhost:3002/api/health | grep -q '"ok"'
echo "Start server health check passed"
kill $START_PID 2>/dev/null || true
5 changes: 5 additions & 0 deletions packages/chronicle/src/cli/commands/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ export const devCommand = new Command('dev')

await linkContent(projectRoot, config);

// Nitro 3's default node-worker runner fails on Windows due to Vite 8 environment API incompatibility
if (process.platform === 'win32' && !process.env.NITRO_DEV_RUNNER) {
process.env.NITRO_DEV_RUNNER = 'node-process';
}

console.log(chalk.cyan('Starting dev server...'));

const { createServer } = await import('vite');
Expand Down
Loading