Skip to content

chore(codex-plugin): bump version to 0.1.1 #211

chore(codex-plugin): bump version to 0.1.1

chore(codex-plugin): bump version to 0.1.1 #211

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
docs-lint:
name: Markdown lint (changelog)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm
- run: npm ci
- run: npm run lint:md:changelog
test:
runs-on: ubuntu-latest
needs: docs-lint
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
- run: npm ci
- run: npm run build
- name: CLI --version matches package.json
run: |
PKG=$(node -p "require('./package.json').version")
CLI=$(node dist/index.js --version)
if [ "$PKG" != "$CLI" ]; then
echo "Version drift: package.json=$PKG, CLI=$CLI"
exit 1
fi
- run: npm test
- run: npm run test:workspaces
bundle-smoke:
name: esbuild bundle smoke test (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest
needs: test
strategy:
fail-fast: false
matrix:
node-version: [18.x, 20.x, 22.x]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
- run: npm ci
- run: npm run build
- name: Shebang count must be exactly 1
run: |
COUNT=$(grep -c "#!/usr/bin/env node" dist/index.js)
if [ "$COUNT" -ne 1 ]; then
echo "FAIL: Expected 1 shebang, found $COUNT"
exit 1
fi
echo "OK: shebang count = $COUNT"
- name: Node.js syntax check
run: node --check dist/index.js
- name: --version smoke test (exits 0, outputs correct semver)
run: |
PKG=$(node -p "require('./package.json').version")
CLI=$(node dist/index.js --version)
echo "package.json=$PKG bundle=$CLI"
if [ "$PKG" != "$CLI" ]; then
echo "FAIL: version mismatch"
exit 1
fi
- name: Bundle size check
run: npm test -- tests/build/
offline-smoke:
name: Offline size budgets
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm
- run: npm ci
- run: npm run build
- name: Seed device-cache fixture
run: |
mkdir -p "$HOME/.switchbot"
cat > "$HOME/.switchbot/devices.json" <<'JSON'
{
"lastUpdated": "2026-04-20T00:00:00.000Z",
"devices": {
"BOT001": { "type": "Bot", "name": "Test Bot", "category": "physical" },
"METER001": { "type": "Meter", "name": "Test Meter", "category": "physical" },
"STRIP001": { "type": "Strip Light 3", "name": "Test Strip", "category": "physical" },
"IRTV001": { "type": "TV", "name": "Test TV", "category": "ir" }
}
}
JSON
- name: agent-bootstrap --compact must stay under 20 KB
run: |
OUT=$(node dist/index.js agent-bootstrap --compact)
BYTES=$(printf '%s' "$OUT" | wc -c)
echo "agent-bootstrap --compact = $BYTES bytes"
if [ "$BYTES" -ge 20000 ]; then
echo "FAIL: budget is 20000, got $BYTES"
exit 1
fi
- name: schema export --compact --used must stay under 15 KB
run: |
OUT=$(node dist/index.js schema export --compact --used)
BYTES=$(printf '%s' "$OUT" | wc -c)
echo "schema export --compact --used = $BYTES bytes"
if [ "$BYTES" -ge 15000 ]; then
echo "FAIL: budget is 15000, got $BYTES"
exit 1
fi
pack-install-smoke:
name: Packed install smoke (${{ matrix.os }})
runs-on: ${{ matrix.os }}
needs: test
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm
- run: npm ci
- run: npm run build
- name: npm pack -> npm install tarball -> switchbot --version / policy new / policy validate
run: npm run smoke:pack-install