Skip to content

Run linting and code coverage in test workflow#345

Merged
andrewmogan merged 11 commits into
developfrom
amogan/bind_mount_cvmfs
Mar 23, 2026
Merged

Run linting and code coverage in test workflow#345
andrewmogan merged 11 commits into
developfrom
amogan/bind_mount_cvmfs

Conversation

@andrewmogan
Copy link
Copy Markdown
Contributor

@andrewmogan andrewmogan commented Mar 19, 2026

Description

This PR allows the test_daq_buildtools.yml workflow to run linting and code coverage steps. This was previously not the case due to the need of llvm and lcov, which we resolve by bind mounting CVMFS into the nightly build container in which the test script runs. This same idea should also be applicable to single-package CI builds.

When working on this, I noticed that test_daq-buildtools.sh would hang indefinitely if given a malformed argument, such as --dbt-branch ${{ github.head_ref }} when ${{ github.head_ref }} was invalid. I added a function to test_daq-buildtools.sh which ensures that any flags passed also have a corresponding argument. I also made the argument passed to --dbt-branch default to ${{ github.ref_name }} to further avoid invalid arguments.

An example test run is here. Note that for this run, I prepended time to each dbt-* command to see how long each took. It seems the initial loading of CVMFS is quite slow, since dbt-setup-release took over 10 minutes. I'm not sure of a good way around this. Also, the test workflow should trigger when I open this PR.

Please also include instructions for how a reviewer can test your changes.

Type of change

  • Documentation (non-breaking change that adds or improves the documentation)
  • New feature or enhancement (non-breaking change which adds functionality)
  • Optimization (non-breaking change that improves code/performance)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (whatever its nature)

Testing checklist

  • Unit tests pass (e.g. dbt-build --unittest)
  • Minimal system quicktest passes (pytest -s minimal_system_quick_test.py)
  • Full set of integration tests pass (daqsystemtest_integtest_bundle.sh)
  • Python tests pass if applicable (e.g. python -m pytest)
  • Pre-commit hooks run successfully if applicable (e.g. pre-commit run --all-files)

Comments here on the testing

Further checks

  • Code is commented where needed, particularly in hard-to-understand areas
  • Code style is correct (dbt-build --lint, and/or see https://dune-daq-sw.readthedocs.io/en/latest/packages/styleguide/)
  • If applicable, new tests have been added or an issue has been opened to tackle that in the future.
    (Indicate issue here: # (issue))

@andrewmogan andrewmogan requested a review from jcfreeman2 March 19, 2026 14:09
Copy link
Copy Markdown
Collaborator

@jcfreeman2 jcfreeman2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes are straightforward and the Action works (https://github.com/DUNE-DAQ/daq-buildtools/actions/runs/23448935833). Approved.

@andrewmogan andrewmogan merged commit 2045551 into develop Mar 23, 2026
3 checks passed
@andrewmogan andrewmogan deleted the amogan/bind_mount_cvmfs branch March 23, 2026 19:14
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.

3 participants