CI / Node 24 (push) Successful in 15s
CI / Node 26 (push) Successful in 16s
CI / Node 22 (pull_request) Successful in 13s
CI / Node 24 (pull_request) Failing after 3s
CI / Node 26 (pull_request) Failing after 4s
CI / Chromium (push) Failing after 1m8s
CI / Publish to staging registry (push) Skipped
CI / Chromium (pull_request) Failing after 1m3s
CI / Publish to staging registry (pull_request) Skipped
CI / Node 22 (push) Failing after 4s
- KVStorageEncrypted: AES-GCM per value (fresh IV, storage key as AAD), keys stay readable; decrypts and re-emits pushed changes and passes subscriptions through, so it can be a composite source. generateKey / exportKey / importKey / deriveKey (PBKDF2). - KVStorageHttpServer: allowOrigins (CORS), including cache-control for SSE preflights. - Chromium tests (Vitest browser mode + Playwright) against a real cross-origin server: conformance for IndexedDB, encrypted, HTTP and composite stores; signed requests and SSE; two devices syncing, offline writes surviving a reload. New CI job. - Composite fixes found by those tests: sync() during a running sync schedules one more (changes between the first scan and the stream connecting were missed); a queued write the source refuses is dropped, restored and reported (onError) instead of blocking the queue forever. - README with examples, mirrored in test/readme.test.ts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Qxbkp4tA7G5SCWjzWuxmE
72 lines
1.8 KiB
YAML
72 lines
1.8 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: ['**'] # not tags
|
|
pull_request:
|
|
|
|
env:
|
|
NPM_REGISTRY: https://verdaccio.harvmaster.com/
|
|
|
|
jobs:
|
|
check:
|
|
name: Node ${{ matrix.node }}
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
node: [22, 24, 26]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
cache: npm
|
|
- run: npm ci
|
|
- name: Format
|
|
run: npm run format:check
|
|
- name: Typecheck
|
|
run: npm run typecheck
|
|
- name: Test
|
|
run: npm run test:only
|
|
- name: Build
|
|
run: npm run build
|
|
|
|
browser:
|
|
name: Chromium
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: npm
|
|
- run: npm ci
|
|
- name: Install Chromium
|
|
run: npx playwright install --with-deps chromium
|
|
- name: Browser tests
|
|
run: npm run test:browser
|
|
|
|
# Pushes only (not pull requests): main → `latest`, next → `next`, other branches → `dev-<branch>`.
|
|
# See scripts/publish.mjs. Needs the NPM_REGISTRY_TOKEN secret.
|
|
staging:
|
|
name: Publish to staging registry
|
|
needs: [check, browser]
|
|
if: github.event_name == 'push'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: npm
|
|
- run: npm ci
|
|
- name: Configure registry
|
|
run: |
|
|
host="${NPM_REGISTRY#https://}"
|
|
printf 'registry=%s\n//%s:_authToken=${NPM_REGISTRY_TOKEN}\n' "$NPM_REGISTRY" "$host" > .npmrc
|
|
- name: Publish
|
|
run: node scripts/publish.mjs "${{ github.ref_name }}"
|
|
env:
|
|
NPM_REGISTRY_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }}
|