I understand that running tests with coverage makes information from @allocated etc unreliable.
I have found various clever workarounds which, generally
- run two sets of tests, with and without coverage, by setting
build_is_production_build: truein the actions file, - in the tests code on the Julia side, check for the env variable
BUILD_IS_PRODUCTION_BUILD, - only run allocation tests when this is set.
This is manageable, but seems a bit convoluted, and I would be essentially copy-pasting a bits of code in various places. Is that the best solution, or is there a more streamlined alternative?