Skip to content

samples-minimal CI can go green while running zero tests — no test-count evidence in the log #198

Description

@monkopedia-coder

Found while reviewing #197, which added .github/workflows/samples-minimal.yml (this repo's first PR-triggered CI).

The gap

The workflow's console log contains no per-test evidence. Gradle's Kotlin/Native test task prints no per-test lines by default, and the workflow uploads no report artifact. So the log shows a green nativeTest whether it ran 3 tests or zero.

The reviewer could not confirm the tests actually executed from CI output at all — they had to build independently in their own worktree and read build/test-results/nativeTest/TEST-nativeTest.GeometryTest.xml to get tests="3" failures="0".

That is precisely the failure class #197 exists to fix. A guard whose own execution is unobservable is a guard you have to take on faith — and a Gradle test task with no matching sources succeeds silently, so "green" and "ran nothing" are indistinguishable from the log.

Fix

Make the test count visible in CI, so a zero-test run is loud:

  1. Upload samples/minimal/build/test-results/** as a workflow artifact.
  2. And/or add testLogging { events("passed", "failed", "skipped") } (plus showStandardStreams if useful) so per-test lines appear in the log.
  3. Ideally assert non-zero: fail the job if the parsed test count is 0. This is the actual guarantee wanted — everything else is evidence for a human who might not look.

Also (minor, from the same review)

The workflow declares no timeout-minutes, so it inherits GitHub's 360-minute cap. The job takes ~2 minutes; a wedged run should not be able to sit for six hours. Worth setting opportunistically.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions