browser tests run only by hand: the suites that launch Chrome / Chromium move to tests/browser/*.browser.ts (bun test, ci, ci:quick and the Forgejo workflows never pick them up; bun run test:browser runs them); the desktop boot check leaves bun run ci (it stays in desktop-release.ts mac at release time); CI=full is gone: Forgejo's ci runs the Rust steps when the push changed a Rust input (STOREBOUND_CI_BASE=HEAD~1), no Playwright install; CONTRIBUTING

This commit is contained in:
CRTkafa 2026-10-15 01:25:17 +08:00
parent 4c7ff89950
commit cd1e13c1e2
20 changed files with 116 additions and 133 deletions

View file

@ -1,5 +1,4 @@
# `bun run ci` after .forgejo/actions/linux-setup: the target / timings / Playwright caches, bun install, headless
# Chromium, Node 20 (the npm bundle's oldest supported Node) and the full CI. Shared by ci.yml and release.yml.
# `bun run ci` after .forgejo/actions/linux-setup: the target / timings caches, bun install, Node 20 (the npm bundle's oldest supported Node) and the full CI. Shared by ci.yml and release.yml.
name: ci-run
description: storebound's full CI (bun run ci) on the Linux runner
runs:
@ -21,25 +20,12 @@ runs:
run: |
bun --version && cargo --version
bun install --frozen-lockfile
# Playwright's Chromium and headless shell (~280 MB), keyed by the browser builds the installed playwright-core
# wants (its browsers.json); the system libraries and fonts (--with-deps) are installed on every run, the job
# container starts clean
- uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ hashFiles('node_modules/playwright-core/browsers.json') }}
restore-keys: playwright-${{ runner.os }}-
# the job runs as root in a container: storebound adds --no-sandbox to the Chromium it starts itself there
# (cli/shots/browser.ts sandboxArgs), Playwright's own launches already pass it
- name: Headless Chromium (browser tests, desktop boot check)
shell: bash
run: bunx playwright install --with-deps chromium
# the npm bundle runs on Node 20+: tools/ci.ts smoke-tests dist/storebound.mjs with the oldest supported Node
- uses: actions/setup-node@v4
with:
node-version: '20'
# the runner sets CI=true in the job and it wins over the workflow env above: set CI=full for the command
# itself, or tools/ci.ts skips the desktop Rust tests and clippy when the push did not touch src-tauri
# no browser tests in CI (tests/browser/ runs only with `bun run test:browser`); the changes of this push (against
# its parent; the checkout has fetch-depth 2) decide the Rust steps, as on a laptop against origin/main
- name: bun run ci
shell: bash
run: CI=full bun run ci
run: STOREBOUND_CI_BASE=HEAD~1 bun run ci

View file

@ -1,7 +1,8 @@
# Every push to main is a release candidate (docs/desktop-release.md, "Release candidates"). In parallel:
# ci bun run ci (adapters, desktop version, tests, typecheck, desktop i18n / typecheck / build, the boot check
# in headless Chromium, desktop Rust tests and clippy, scrub); tools/ci.ts runs it as a task graph with
# parallel test shards on the one Linux runner. CI=full runs the Rust steps on every push.
# parallel test shards on the one Linux runner; no browser test runs here (tests/browser/, `bun run
# test:browser` by hand). The Rust steps run when the push changed a Rust input (STOREBOUND_CI_BASE).
# acceptance the release acceptance matrix (tools/acceptance.ts): every user-facing command from the packed npm
# tarball with real piped stdin, Linux and Windows x Node 20 / Node 22 / Bun.
# linux AppImage + deb (path-free build), self-tests, both started under Xvfb, privacy scan.
@ -26,7 +27,6 @@ env:
BUN_VERSION: '1.4.0'
CARGO_TERM_COLOR: never
CARGO_INCREMENTAL: '0'
CI: full
jobs:
gate:
@ -63,6 +63,8 @@ jobs:
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: ./.forgejo/actions/linux-setup
with:
cache-key: ci