How do I test a secret in a module (<https://www.n...
# modules
b
How do I test a secret in a module (https://www.nextflow.io/docs/latest/secrets.html#secrets). As far as I understand, I can include the directive in the process and call it in a template script, but how would I test if it's working while running nf-test. For context, I need the user to provide their API key to use a module to submit a dataset to cloud server.
m
checkout how we do if for the sentieon modules
b
I checked, but I don't fully get it, wouldn't I need to specify at test API key so that it passes the CI test. I understand that I need to add
env
in nextflow.config, but the environment variable has to be defined somewhere (e.g. as in https://github.com/nf-core/modules/blob/990833f97f24d90f0df483e73bdafc29f63c8a47/modules/nf-core/sentieon/dedup/tests/nextflow.config). I just don't understand where to store the actual API key for testing so that passes the CI tests.
I think for nf-test to work, I have to add an environment variable in the
.github/actions/nf-test-action/action.yml
, more specifically this bit
Copy code
env:
        SENTIEON_LICSRVR_IP: ${{ env.SENTIEON_LICSRVR_IP }}
        SENTIEON_AUTH_MECH: "GitHub Actions - token"
And the env variable
env.SENTIEON_LICSRVR_IP
has to be added via github actions secrets, and I don't have permission to add it.
There might be another way and I could have misunderstood how it works.
m
yeah, sorry, I meant to say more, but ended up going in a meeting
So we would need to add a secret for this in github
we can do it for you
b
That'd be great. Should I DM you the API key ?.
m
Yes please, I won't be able to do anything more tonight unfortunately, I'm logging out
b
No worries, whenever you're available next week. Have a good weekend