Restructure testing workflows#846
Conversation
…ok checks are completed
|
@cpaniaguam do you mind checking I trust you that you know better, so I am good with you just imposing the HSSM way on the other packages wherever they do anything differently on that front. |
digicosmos86
left a comment
There was a problem hiding this comment.
LGTM! As an improvement on top of this, we can also differentiate more tests with markers. For example, tests for plotting does not have to be run for every push either, and they tend also to be slightly slower than other unit tests
I'll mark the plotting tests as slow in a separate PR, Thanks. |
This pull request introduces improvements to the GitHub Actions CI workflows, focusing on more flexible and thorough test execution, coverage reporting, and clearer workflow dependencies. The main changes include enabling selective running of slow tests, adding a dedicated coverage workflow, and updating workflow triggers and job dependencies.
Testing workflow improvements:
run_slow_teststorun_tests.yml, allowing workflows to selectively run slow tests or only fast tests. The test steps now conditionally run either all tests or only those not marked as slow (@pytest.mark.slow). ([[1]](https://github.com/lnccbrown/HSSM/pull/846/files#diff-c2e9f7c1bfaf65da79bbd29ed3ce389b2acc8b4099a257914a7292a66e6b9bc9R6-R11),[[2]](https://github.com/lnccbrown/HSSM/pull/846/files#diff-c2e9f7c1bfaf65da79bbd29ed3ce389b2acc8b4099a257914a7292a66e6b9bc9L27-R43),[[3]](https://github.com/lnccbrown/HSSM/pull/846/files#diff-f9b3993736be1d0babd0d15fb8dc6dba8881bcc299a7311e99ac43c4feb4d9bcR88))build_and_publish.yml) to run the full test suite (including slow tests) and renamed the job for clarity. ([.github/workflows/build_and_publish.ymlL14-R25](https://github.com/lnccbrown/HSSM/pull/846/files#diff-ebf33a46dfb7b44353d6b00f5978292fa922bcd221f948c81cd7aa3afd70e5baL14-R25))run_slow_tests.ymlto manually or automatically run slow tests on the main branch. ([.github/workflows/run_slow_tests.ymlR1-R14](https://github.com/lnccbrown/HSSM/pull/846/files#diff-5eeec33ae10242fec28be6c42f52bc4dce0f8e5f1198cc567120b47305fd77c0R1-R14))Coverage reporting:
coverage.ymlworkflow to run tests with coverage reporting and upload results to Codecov on pushes tomainor manual triggers. ([.github/workflows/coverage.ymlR1-R39](https://github.com/lnccbrown/HSSM/pull/846/files#diff-a2115d277b5ca5a2f09a999e53440839cf332b94da177f3d1766334555b0f7c6R1-R39))Workflow dependencies and triggers:
publishjob inbuild_and_publish.ymlto depend on linting, tests, and notebook checks, ensuring all checks pass before publishing. ([.github/workflows/build_and_publish.ymlL14-R25](https://github.com/lnccbrown/HSSM/pull/846/files#diff-ebf33a46dfb7b44353d6b00f5978292fa922bcd221f948c81cd7aa3afd70e5baL14-R25))