Skip to content

ci: run unit tests with checkmate - #31

Merged
cryo2010 merged 1 commit into
mainfrom
ci/checkmate
Aug 28, 2026
Merged

cryo2010 merged 1 commit into
mainfrom
ci/checkmate

Conversation

@cryo2010

Copy link
Copy Markdown
Owner

Summary

Switches the CI test job from direct nim c -r invocations to the checkmate test runner, configured by the committed .checkmate.toml. Each memory manager (orc, arc, refc) now runs:

checkmate --loop=10 --loop-in-process --bail --nimflags:--mm:<mm>

which executes the whole suite 10 times per memory manager (in-process looping, so it's fast: ~5s locally for 2440 test executions) and bails at the first failure. The looping gives us flake detection we didn't have, which matters for a library whose test surface includes ref-heavy validator trees under three memory managers.

Verified before switching

The reason the previous steps bypassed nimble was its swallowed exit codes, so the same property was checked for checkmate empirically:

  • failing suite: exit 1 (probed with a deliberately failing test file)
  • passing suite: exit 0, all 244 tests, under the exact CI flags
  • --nimflags:--mm:arc / refc carry the memory-manager selection correctly (verified locally for all three)

Also adds the .checkmate/ cache directory to .gitignore, per the config file's own guidance.

Replaces the direct nim c -r test steps with checkmate, configured via
the committed .checkmate.toml. Each memory manager (orc, arc, refc)
runs the suite 10 times in-process with --bail for flake detection.
Verified locally that checkmate propagates failures as a non-zero exit
(unlike nimble test) and that --nimflags carries the mm selection. The
.checkmate/ cache dir is gitignored.
@cryo2010
cryo2010 merged commit 4bcebe6 into main Aug 28, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant