Skip to content

Coverage/targeted lanes 2026 03 05 #276

Coverage/targeted lanes 2026 03 05

Coverage/targeted lanes 2026 03 05 #276

Workflow file for this run

name: CI
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
push:
branches: ["main"]
merge_group:
workflow_dispatch:
inputs:
coverage_lane:
description: "Active integration coverage lane"
required: false
default: "expo"
type: choice
options:
- astro
- tanstack
- react-native
- expo
- web
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
env:
FORCE_COLOR: 3
jobs:
ci:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [24, 25]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Using Node.js ${{ matrix.node-version }}
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: ${{ matrix.node-version }}
- name: Setup Bun
uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2.0.1
with:
bun-version: "1.3.10"
- name: Install dependencies
run: bun install
- name: Install Playwright browsers
run: bun x playwright install --with-deps
- name: Verify
run: bun run verify
- name: Coverage summary
if: always()
run: |
{
echo "## Coverage Summary"
echo
if [ -f coverage/coverage-summary.json ]; then
node -e 'const fs=require("node:fs"); const total=JSON.parse(fs.readFileSync("coverage/coverage-summary.json","utf8")).total; console.log("- Vitest (v8): lines "+total.lines.pct+"% | statements "+total.statements.pct+"% | branches "+total.branches.pct+"% | functions "+total.functions.pct+"%");'
else
echo "- Vitest (v8): not available"
fi
if [ -f coverage/bun/lcov.info ]; then
node -e 'const fs=require("node:fs"); const txt=fs.readFileSync("coverage/bun/lcov.info","utf8"); let LF=0,LH=0,BRF=0,BRH=0,FNF=0,FNH=0; for (const line of txt.split(/\r?\n/)) { if (line.startsWith("LF:")) LF += Number(line.slice(3)); else if (line.startsWith("LH:")) LH += Number(line.slice(3)); else if (line.startsWith("BRF:")) BRF += Number(line.slice(4)); else if (line.startsWith("BRH:")) BRH += Number(line.slice(4)); else if (line.startsWith("FNF:")) FNF += Number(line.slice(4)); else if (line.startsWith("FNH:")) FNH += Number(line.slice(4)); } const pct=(h,f)=>f===0?"0.00":((h/f)*100).toFixed(2); console.log("- Bun test: lines "+pct(LH,LF)+"% ("+LH+"/"+LF+") | branches "+pct(BRH,BRF)+"% ("+BRH+"/"+BRF+") | functions "+pct(FNH,FNF)+"% ("+FNH+"/"+FNF+")");'
else
echo "- Bun test: not available"
fi
} >> "$GITHUB_STEP_SUMMARY"
coverage-lane:
runs-on: ubuntu-latest
env:
EVOLU_ACTIVE_COVERAGE_LANE: ${{ github.event.inputs.coverage_lane || vars.EVOLU_ACTIVE_COVERAGE_LANE || 'expo' }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 24
- name: Setup Bun
uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2.0.1
with:
bun-version: "1.3.10"
- name: Install dependencies
run: bun install
- name: Build workspace packages
run: bun run build
- name: Run active coverage lane
run: bun run coverage:lane:active
relay-runtime-smoke:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [24, 25]
runtime: [bun, node]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Using Node.js ${{ matrix.node-version }}
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: ${{ matrix.node-version }}
- name: Setup Bun
uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2.0.1
with:
bun-version: "1.3.10"
- name: Install dependencies
run: bun install
- name: Relay smoke tests (Bun runtime)
if: matrix.runtime == 'bun'
run: >
bunx vitest run --project unit
packages/common/test/WebSocket.test.ts
packages/common/test/local-first/Relay.test.ts
- name: Relay smoke tests (Node runtime)
if: matrix.runtime == 'node'
run: >
node ./node_modules/vitest/vitest.mjs run --project unit
packages/common/test/WebSocket.test.ts
packages/common/test/local-first/Relay.test.ts
expo-smoke:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [24]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Using Node.js ${{ matrix.node-version }}
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: ${{ matrix.node-version }}
- name: Setup Bun
uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2.0.1
with:
bun-version: "1.3.10"
- name: Install dependencies
run: bun install
- name: Build workspace packages
run: bun run build
- name: Expo doctor
working-directory: examples/react-expo
continue-on-error: true
run: bunx expo-doctor
- name: Expo web export smoke
working-directory: examples/react-expo
run: bun run web:export
integrations-smoke:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [24, 25]
example: [astro, tanstack-start, tauri]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Using Node.js ${{ matrix.node-version }}
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: ${{ matrix.node-version }}
- name: Setup Bun
uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2.0.1
with:
bun-version: "1.3.10"
- name: Install dependencies
run: bun install
- name: Build integration package
run: bunx turbo --filter @evolu/${{ matrix.example }} build
- name: Build integration example
run: bunx turbo --filter @example/${{ matrix.example }} build