Some checks failed
repo hygiene / hygiene (push) Has been cancelled
nigig-build (CAD) / supply-chain (push) Has been cancelled
nigig-build (CAD) / cad-module (push) Has been cancelled
nigig-build (CAD) / full-crate-check (push) Has been cancelled
nigig-build (CAD) / cad-engine-coverage (push) Has been cancelled
nigig-build (CAD) / doc-workspace-coverage (push) Has been cancelled
nigig-build (CAD) / cad-widget-coverage (push) Has been cancelled
spreadsheet / engine-coverage (push) Has been cancelled
spreadsheet / ui-controller-coverage (push) Has been cancelled
Phase 0 of REVIEWS/REPO_COVERAGE_100_PLAN.md, and the reason it is Phase 0: no new tests, no new measurement, just ratchets on numbers that were already good and already decaying-capable. **spreadsheet** — `tools/test-spreadsheet-coverage.sh` has had a 96 floor for the engine and another for the UI controllers, and no CI job has ever run it. New `.forgejo/workflows/spreadsheet.yml`, two jobs: engine-coverage 98.83% of lines (floor 96) ui-controller-coverage 98.85% of lines (floor 96) Split in two because the halves cost very differently. The engine is pure Rust and finishes in about three minutes; the UI half has to build Makepad's Linux backend to link a test binary. One job would hide an engine regression behind a ten-minute build. **CAD widget layer** — `cad-widget-coverage` in nigig-build.yml, deliberately REPORT-ONLY. It sits at 13.25% of 10,637 lines with six files at exactly zero, and a floor there would read as a blessing rather than a debt. What the job buys is that the number is printed on every push instead of being rediscovered in six months. The first real input test should set a floor behind it. Also corrects the plan. It claimed the doc workspace module was ungated; it is not — nigig-build.yml has run doc-workspace-coverage since before the plan was written. I had surveyed by grepping workflow files for the word "coverage" and attributed nigig-build's coverage jobs to CAD alone. I nearly committed a duplicate workflow on the strength of it. The census table was right; the prose under it was not, and the correction is in the file. One thing checked and deliberately NOT changed: the spreadsheet script appears to skip its UI half when the native packages are absent. It does not. `makepad-native-libs.sh --check` returns 1, the script runs under `set -e`, and it aborts. What misled me was reading `$?` after piping the script into `tail` — which reports tail's status, not the script's. The same class of mistake this repository's CI comments warn about; no fix was needed and none was made. Verified by running each job's exact command line: COVERAGE_TARGET=engine ./tools/test-spreadsheet-coverage.sh rc=0 COVERAGE_TARGET=ui ./tools/test-spreadsheet-coverage.sh floors met ./tools/test-cad-widget-coverage.sh 13.25%, rc=0
79 lines
3 KiB
YAML
79 lines
3 KiB
YAML
name: spreadsheet
|
|
|
|
# Phase 0 of REVIEWS/REPO_COVERAGE_100_PLAN.md.
|
|
#
|
|
# tools/test-spreadsheet-coverage.sh has existed with per-file floors for
|
|
# some time and **no CI job ran it**. 15,373 measured lines with nothing
|
|
# stopping them decaying: the cheapest gap in the plan, and this closes
|
|
# it. No new tests are written here — this is ratchet installation.
|
|
#
|
|
# Measured when this job was added:
|
|
# engine 98.83% of lines (floor 96)
|
|
# ui-controllers 98.85% of lines (floor 96)
|
|
#
|
|
# Two jobs rather than one, because the halves have very different costs
|
|
# and very different failure modes. The engine is pure Rust and finishes
|
|
# in about three minutes; the UI half has to build Makepad's Linux
|
|
# backend to link a test binary, which is the slow part and the part
|
|
# that breaks when a native package goes missing from the runner. A
|
|
# single job would hide an engine regression behind a ten-minute build.
|
|
#
|
|
# The script installs the toolchain from rust-toolchain.toml into its own
|
|
# temporary directory and deletes it on exit, so there is deliberately no
|
|
# toolchain step here.
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'crates/apps/spreadsheet/**'
|
|
- 'tools/test-spreadsheet-coverage.sh'
|
|
- 'tools/makepad-native-libs.sh'
|
|
- 'Cargo.lock'
|
|
- 'Cargo.toml'
|
|
- 'rust-toolchain.toml'
|
|
- '.forgejo/workflows/spreadsheet.yml'
|
|
pull_request:
|
|
paths:
|
|
- 'crates/apps/spreadsheet/**'
|
|
- 'tools/test-spreadsheet-coverage.sh'
|
|
- 'tools/makepad-native-libs.sh'
|
|
- 'Cargo.lock'
|
|
- 'Cargo.toml'
|
|
- 'rust-toolchain.toml'
|
|
- '.forgejo/workflows/spreadsheet.yml'
|
|
|
|
jobs:
|
|
# ---------------------------------------------------------------------
|
|
# The formula engine: pure Rust, no Makepad, no display. This is the
|
|
# job that can prove something cheaply, so it runs unconditionally and
|
|
# first.
|
|
# ---------------------------------------------------------------------
|
|
engine-coverage:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Engine coverage, with floors
|
|
run: COVERAGE_TARGET=engine ./tools/test-spreadsheet-coverage.sh
|
|
|
|
# ---------------------------------------------------------------------
|
|
# The UI controller modules. Needs Makepad's Linux packages to LINK the
|
|
# test binary -- `cargo check` passes without them and the link then
|
|
# fails with "unable to find library -lasound", long after the compile
|
|
# appeared to succeed. tools/makepad-native-libs.sh documents the set.
|
|
#
|
|
# The script calls that helper's --check itself and aborts when a
|
|
# package is missing, so this job cannot quietly measure nothing.
|
|
# ---------------------------------------------------------------------
|
|
ui-controller-coverage:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Makepad's native dependencies
|
|
run: bash tools/makepad-native-libs.sh --install
|
|
|
|
- name: UI controller coverage, with floors
|
|
run: COVERAGE_TARGET=ui ./tools/test-spreadsheet-coverage.sh
|