Run unit tests and clang formatting as part of single-package CI build#24
Open
andrewmogan wants to merge 16 commits into
Open
Run unit tests and clang formatting as part of single-package CI build#24andrewmogan wants to merge 16 commits into
andrewmogan wants to merge 16 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR partially addresses DUNE-DAQ/daq-release#544 by moving nightly code checks into the single-package CI builds. In addition to
dbt-build --lint, this will also rundbt-build --unittestanddbt-clang-format.shin the same container spun off the relevant image. In the interest of somewhat reducing code duplication, there's a dedicated step that generates a wrapper script which does the typical setup steps, e.g.,cd $DBT_AREA_ROOT && source env.shetc.Running tests inside a container introduced a couple of quirks to do with permissions in Docker containers. To get around this, each
docker runcommand now includes a--user $(id -u):$(id -g)to emulate a more typical non-root user experience. This in turn requires explicitly allowing others to write to the$GITHUB_WORKSPACE.All artifacts are uploaded just as in the nightly code check workflow. Eventually, I want the CI dashboard workflow to pull these single-repo artifacts and structure the dashboard around individual repos rather than giant lists of tests. But for now, the nightly code checks and CI dashboard will proceed as normal until I implement this.
I primarily tested this using
opmonlibsince one of its unit tests attempts to write to a root area and expects an exception to be thrown.Successful test in
opmonlib: https://github.com/DUNE-DAQ/opmonlib/actions/runs/28816083789