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