What would be the best way to exclude a test profi...
# tools
j
What would be the best way to exclude a test profile from the CI tests? We generated a test/snapshot for full test on #funcscan but this keeps being attempeted to run on GitHub Actions (with obvious consequences)
m
Mark it with a tag and add that too exclude_tags in the nf-test action
j
As in here:
Copy code
matrix:
        shard: ${{ fromJson(needs.nf-test-changes.outputs.shard) }}
        profile: [conda, docker, singularity]
        isMain:
          - ${{ github.base_ref == 'master' || github.base_ref == 'main' }}
        # Exclude conda and singularity on dev
        exclude:
          - isMain: false
            profile: "conda"
          - isMain: false
            profile: "singularity"
        NXF_VER:
          - "24.04.2"
          - "latest-everything"
No wait...
I don't find
exclude_tags:
anywhere?
m
I can help you with this
I know my answer is often Sarek, and one more time it is
maxime 2
j
sarek has it
sarek has done it
m
But methylseq is doing it too
j
I can't remember che phrase 😱
s
Sarek is using it
🤣 1
👍 1
m
In both these pipelines we have CPUs and gpus tags, that are basically just running these particular tags for the corresponding actions
But we use filter and not exclude
j
But this is outside the template?
m
Yeah, but isn't it what the template is for?
In my view the template is the foundation on which we build our house
j
True, I'm just getting concerned the whole pipeline nf-test implementation is getting very spahgetti and I'm starting to lose track
🤣 1
m
Understandable
j
I like consistency so I can quickly switch between my (too) many pipelines 😬
Anyway, show me what you've got
m
So do I
Give me 5 min to arrive to a computer
❤️ 1
ok, so
s
Sarek is using it
m
if you follow the TEMPLATE as I believe you are
you should have the
.github/actions/nf-test/action.yml
file
All of us have the same, and it's using the same logic, but allow for more than what we basically require from the TEMPLATE in the
nf-test.yml
We currently don't have the feature in nf-test to exclude by tags, but you can include by tags
on the modules repo, we filter via the
exclude_tags
possibility, but that's something that's only implemented at the modules level
because we use a different actions to detect the file changed than the default ci mode for nf-test
j
Ok
m
no
but almost
don't touch this action
j
ok ok
in sarek/methylseq, we have the tag `cpus`: https://github.com/nf-core/sarek/blob/dev/.github/workflows/nf-test.yml#L60 https://github.com/nf-core/sarek/blob/dev/.github/workflows/nf-test.yml#L113 That will run all the tests with this tag, which allow us to exclude the tests that don't have this tag
j
ooooh
m
you see what I meant with tiny modification to the TEMPLATE
👍 1
j
So e.g. I could add "pipeline" as a tag there, and then remove our tag in the
test_full.nf.test
and everything should be hunky dory?
m
yeah
j
OK I'll try that quickly now
m
in sarek all our test have cpus, but this one: https://github.com/nf-core/sarek/blob/dev/tests/aligner-parabricks.nf.test#L7 which has gpus instead
j
Ah wait maybe I don't want to do that... that means it won't run all the lcoal module tests etc?
no?
OK but we don't jhave any local module tests atm for funcscan so I will ignore that 😬
m
I would just add a
test_full
tag in the
test_full.nf.test
and exclude that
j
I don't know where to exclude stuff though?
Doesn't seem to be in pipeline template
m
ah, wait we are not using
https://github.com/adamrtalbot/detect-nf-test-changes/
in the template confused dog
sorry, nevermind me then
j
Seems not
m
I don't think we should be using this action in the TEMPLATE, we should push for nf-test to provide us with exclude possibility
👍 1
or contribute
👍 1
j
Seems like afundamentla thing indeed
m
a pr is there since december https://github.com/askimed/nf-test/pull/283 …
💯 1
j
Or I just rename the file...
m
I believe we're all waiting for it
j
OK I need to focus on mag for a bit, will try to come back to this a bit later with either renaming the file or Maxime's approach
m
i would rename it then
here is how we do it in modules btw. https://github.com/nf-core/modules/blob/master/.github/workflows/nf-test.yml#L58-L65 I don’t quite understand atm why we chose a different approach in the template in the end
m
For me, the approach in the modules is a wonderful hack, but we only have that because we needed it on prod right away, it's a patch, it's not something that we want to ship in the template
I'd rather we hack nf-test with extra tags and use the ci mode, and wait/push for a simple solution that will be easier to update on the TEMPLATE
m
an official github action which is in our hands doesn’t feel like a hacky solution to me (especially if we are not too strict with the version pinning there). but we should add your tag approach then to the docs
m
True