Skip to content
Closed
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
59 changes: 59 additions & 0 deletions .github/workflows/compat-sweep.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Compatibility sweep

# Runs the viewer's dataset checks against public OME-Zarr datasets (see
# scripts/compat-sweep/sweep.ts) and publishes REPORT.md and results.csv to the
# compat-sweep branch, one commit per run.
on:
workflow_dispatch:
inputs:
per_list:
description: Datasets sampled per source list
default: '15'
push:
paths:
- 'scripts/compat-sweep/**'
- '.github/workflows/compat-sweep.yml'

permissions:
contents: write

concurrency:
group: compat-sweep

jobs:
sweep:
name: Compatibility sweep
runs-on: ubuntu-latest
timeout-minutes: 40
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version-file: package.json

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

- name: Run sweep
run: bun scripts/compat-sweep/sweep.ts --per-list "${{ inputs.per_list || '15' }}" --out sweep-out

- name: Add report to the job summary
run: cat sweep-out/REPORT.md >> "$GITHUB_STEP_SUMMARY"

- name: Publish to the compat-sweep branch
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mkdir publish && cd publish
git init -q
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git remote add origin "https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
if git fetch -q --depth 1 origin compat-sweep; then git checkout -q -b compat-sweep FETCH_HEAD; else git checkout -q --orphan compat-sweep; fi
cp ../sweep-out/REPORT.md ../sweep-out/results.csv .
git add REPORT.md results.csv
git commit -q -m "Sweep of ${GITHUB_REF_NAME}@${GITHUB_SHA::7}"
git push -q origin compat-sweep
13 changes: 13 additions & 0 deletions scripts/compat-sweep/stub-worker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Stand-in for the Vite-bundled chunk worker when the compatibility sweep runs
// Kiln's metadata code under bun: it answers setup messages and never loads bricks.
export default class StubWorker {
onmessage = null;
onerror = null;

postMessage(message) {
if (message.type === 'loadBrick' || message.type === 'cancel') return;
queueMicrotask(() => this.onmessage?.({ data: { type: message.type, id: message.id } }));
}

terminate() {}
}
Loading
Loading