tools icon indicating copy to clipboard operation
tools copied to clipboard

Add nf-test to pipeline template CI workflow

Open adamrtalbot opened this issue 1 year ago • 4 comments

Will close #2854

Replaces CI workflow with nf-test version.

Changes:

  • Uses a Python script to find changed files between PR branch and base.
  • Flags any nf-test files present
  • Adds 'special' cases such as pipeline level tests
  • Identifies any dependencies of changed tests
  • Returns as list of nf-test files to run
  • Runs nf-test as a matrix over those files
  • Confirm pass based on results of previous

PR checklist

  • [x] This comment contains a description of changes (with reason)
  • [x] CHANGELOG.md is updated
  • [ ] If you've fixed a bug or added code that should be tested, add tests!
  • [ ] Documentation in docs is updated

adamrtalbot avatar Mar 19 '24 12:03 adamrtalbot

@nf-core-bot changelog

adamrtalbot avatar Mar 19 '24 12:03 adamrtalbot

first, we need docs on how to write nf-test for pipelines

And I think this would make more sense with a test added to the pipeline.

adamrtalbot avatar Mar 19 '24 13:03 adamrtalbot

We should also add nf-test to the pipieline template, the current template doesn't have them, so this won't work with most of the pipelines which don't have nf-test.

mirpedrol avatar Mar 20 '24 11:03 mirpedrol

FYI this is out of date and needs updating with this: https://github.com/adamrtalbot/detect-nf-test-changes and then use nf-test v0.9.0 which includes related features.

adamrtalbot avatar Jun 26 '24 13:06 adamrtalbot

@mirpedrol the unittests are failing on my laptop even on dev so I'm struggling to fix these issues. I get lots of import errors:

AttributeError: module 'nf_core.modules' has no attribute 'modules_utils'

adamrtalbot avatar Jul 05 '24 15:07 adamrtalbot

@adamrtalbot tests are fixed now. What are we missing to merge this PR?

mirpedrol avatar Jul 09 '24 14:07 mirpedrol

@mirpedrol https://github.com/nf-core/website/pull/2626

mashehu avatar Jul 09 '24 14:07 mashehu

@mirpedrol nf-core/website#2626

That's not true, https://github.com/nf-core/tools/pull/2992 is blocked by that PR. This PR is blocked by #2992.

adamrtalbot avatar Jul 09 '24 14:07 adamrtalbot

I will try to fix the mypy errors

mashehu avatar Jul 15 '24 08:07 mashehu