All of the integration tests use cargo run and test the output, but none of them pass the --release flag to cargo run when the tests were run with the release flag. The best environment variable I've found to help with this is CARGO_BIN_EXE_databind, which contains the path of the built binary. Removing the filename from the end of the path would give you the path to a folder named either debug or release, which could be used to tell whether to pass the release flag to cargo run.
Currently, the tests take longer than the build step of the Build And Test workflow since it has to rebuild the binary without release optimizations. Implementing this could save some time, especially on workflow runs that don't have a cache.
All of the integration tests use
cargo run
and test the output, but none of them pass the--release
flag tocargo run
when the tests were run with the release flag. The best environment variable I've found to help with this isCARGO_BIN_EXE_databind
, which contains the path of the built binary. Removing the filename from the end of the path would give you the path to a folder named eitherdebug
orrelease
, which could be used to tell whether to pass the release flag tocargo run
.Currently, the tests take longer than the build step of the Build And Test workflow since it has to rebuild the binary without release optimizations. Implementing this could save some time, especially on workflow runs that don't have a cache.