Skip to content

Run unit tests and clang formatting as part of single-package CI build#24

Open
andrewmogan wants to merge 16 commits into
developfrom
amogan/run_unit_tests_and_clang_formatting
Open

Run unit tests and clang formatting as part of single-package CI build#24
andrewmogan wants to merge 16 commits into
developfrom
amogan/run_unit_tests_and_clang_formatting

Conversation

@andrewmogan

Copy link
Copy Markdown
Contributor

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 run dbt-build --unittest and dbt-clang-format.sh in 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.sh etc.

Running tests inside a container introduced a couple of quirks to do with permissions in Docker containers. To get around this, each docker run command 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 opmonlib since 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant