Open kelseymh opened 4 years ago
This is a long-standing issue, see also #2278.
We currently don't have a good way to run those checks outside of the unit tests.
We should move all those checks into --check-contrib
, and then make the tests use the functions implementing --check-contrib
, to prevent that they diverge again, which boils down to moving some of the code that is currently only in test/easyconfigs/easyconfigs.py into the framework.
It still won't be perfect though, since some of the checks done in the easyconfigs test suite are harder to replicate outside of the easyconfigs test suite, like making sure no conflicts are introduced, or avoiding that a "multi-variant dependency" is introduced in a particular generation of easyconfigs (especially the latter we wouldn't want to move into framework, because of the exceptions we have in check_dep_vars
.
One thing you can easily do before opening a pull request is to create a branch in GitHub (via eb --new-branch-github
), make sure the tests pass in your fork in GitHub Actions (should show up in https://github.com/kelseymh/easybuild-easyconfigs/actions in your case), and only open the PR when the tests pass (using eb --new-pr-from-branch
).
That probably only a partial help, since it'll still take a while for the tests to fail, but at least you won't have to run them locally.
Thanks, @boegel ! I certainly don't think the whole test suite belongs in --check-contrib
(gah, that would be annoying!). I was mostly thinking about the "style" checks done on just the EC file structure that get done and reported.
I will try out your suggestion with --new-branch-github
. With EC's, I've been using the --new-pr
and --update-pr
actions, which are really great. This is another tool in that kit, which sounds quite useful.
On several of my PRs so far, I've had to iterate various fixes to my EasyConfigs files, because they only show up as failures during the testing on GitHub. A few examples:
Only the "whitespace" complaints also showed up in
--check-contrib
(which taught me to use--check-contrib
in the first place). Is there an easy way to run some of these tests (not the whole 45-minute validation suite) locally, before submitting?I read the Unit tests documentation, but it is not entirely obvious to me how to do this.