Build unit tests in separate pipeline job
Description
The current pipeline is set up to build all targets in the build:main
build with Release
flags (with optimization). this includes all unit tests which might become more in the future and clutter the finished Docker application.
We should start distinguishing between
-
system tests: tests on the final application, i.e., the
dorie
executable - unit tests: tests that run special executables which only serve this purpose
Proposal
- Further split the
build
stage by creating a new jobbuild:unit-tests
: Compile all (unit) test executables. - Remove
build_tests
command frombuild:main
. - Add job
test:unit-tests
to the testing stage: Run all system test executables here. - Add custom target
unit_test
for running all system tests. This requires a naming convention for system tests: All system test targets must begin withdorie_ut_
test
. They will be collected into the custom target using a regex match.
How to test the implementation?
New pipeline succeeds.
Related issues
!87 (merged), !82 (merged), !55 (merged) add more system tests.
People involved
@sospinar, what do you think?
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information