Tests fail on CI, pass locally

Copying my answer from the Github issue:

Is there a workaround? Some way to get the coverage report but in parallel run CI tests with the same compiler options that we use for production? (and thus, the ones which we test locally)

FixedSizeArrays works around this issue by splitting CI into coverage-enabled and coverage-disabled jobs. CI informs the test suite that “the build is a production build” when coverage is disabled, thus enabling the no-allocation tests:

The test suite needs to parse the environment variable:

The CI is configured like so:

Perhaps it’d be good if a Github Action was available to make this easier.

1 Like