Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Update module_name filter step #7106

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

edmundmiller
Copy link
Contributor

Created a small test script to prevent re-running into edge-cases and to quickly add new test cases. If we don't hate the idea I think we can wire it up to the javascript file to avoid any copy-paste errors.

Co-authored-by: Matthias Hörtenhuber <[email protected]>
@edmundmiller edmundmiller marked this pull request as ready for review November 27, 2024 16:40
@edmundmiller edmundmiller requested a review from a team as a code owner November 27, 2024 16:40
@edmundmiller edmundmiller marked this pull request as draft November 27, 2024 16:40
Copy link
Member

@MatthiasZepper MatthiasZepper left a comment

Choose a reason for hiding this comment

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

I have now only tested the script in isolation, but the test cases pass for me locally as well. Thanks for the solid work!

@MatthiasZepper
Copy link
Member

Looking at the CI failure in this PR...can it be that it was only the missing bracket in the .map() function that caused all the issues?

      - name: Get module name
        uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
        id: module_names
        with:
          script: |
            return [...new Set(${{ steps.filter.outputs.modules_files }}
                .map(path => path
                .replace('tests/', '')
                .replace('modules/nf-core/', '')
                .split('/')
                .slice(0, 2)
                .filter(x => !x.startsWith('main.nf') && x !== 'tests' && x !== 'meta.yml' && x !== 'environment.yml')
                .join('/'))
              )
            ];

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