diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 77e3398d..32712ef2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -108,6 +108,9 @@ jobs: profile_download: name: nf-test with profiles needing entrez downloads + # Only run on PRs from branches of nf-core/metapep repository or on push if this is the nf-core dev branch (merged PRs) + # (GitHub secrets are not accessible for workflows from forks) + if: ${{ github.event.pull_request.head.repo.full_name == 'nf-core/metapep' || (github.event_name == 'push' && github.repository == 'nf-core/metapep') }} needs: define_nxf_versions runs-on: ubuntu-latest strategy: diff --git a/nf-test.config b/nf-test.config index 69f28960..a1359d77 100644 --- a/nf-test.config +++ b/nf-test.config @@ -1,5 +1,3 @@ -config { - config { // location for all nf-tests testsDir "tests" @@ -15,6 +13,6 @@ config { // run all test with the defined docker profile from the main nextflow.config profile "" -} } + diff --git a/tests/nextflow.config b/tests/nextflow.config index 3d45039a..54484af3 100644 --- a/tests/nextflow.config +++ b/tests/nextflow.config @@ -1 +1,4 @@ -// Impose same minimum Nextflow version as the pipeline for testing +env { + NCBI_EMAIL = "$NCBI_EMAIL" + NCBI_KEY = "$NCBI_KEY" + } diff --git a/tests/pipeline/test_all.nf.test b/tests/pipeline/test_all.nf.test index 45c68854..77126cd5 100644 --- a/tests/pipeline/test_all.nf.test +++ b/tests/pipeline/test_all.nf.test @@ -10,8 +10,8 @@ nextflow_pipeline { when { params { outdir = "$outputDir" - ncbi_email = "$NCBI_EMAIL" - ncbi_key = "$NCBI_KEY" + ncbi_email = "\$NCBI_EMAIL" + ncbi_key = "\$NCBI_KEY" } } diff --git a/tests/pipeline/test_mouse.nf.test b/tests/pipeline/test_mouse.nf.test index 69c9399e..071201ac 100644 --- a/tests/pipeline/test_mouse.nf.test +++ b/tests/pipeline/test_mouse.nf.test @@ -10,8 +10,8 @@ nextflow_pipeline { when { params { outdir = "$outputDir" - ncbi_email = "$NCBI_EMAIL" - ncbi_key = "$NCBI_KEY" + ncbi_email = "\$NCBI_EMAIL" + ncbi_key = "\$NCBI_KEY" } } diff --git a/tests/pipeline/test_taxa_only.nf.test b/tests/pipeline/test_taxa_only.nf.test index 30fa5926..d14f3c16 100644 --- a/tests/pipeline/test_taxa_only.nf.test +++ b/tests/pipeline/test_taxa_only.nf.test @@ -10,8 +10,8 @@ nextflow_pipeline { when { params { outdir = "$outputDir" - ncbi_email = "$NCBI_EMAIL" - ncbi_key = "$NCBI_KEY" + ncbi_email = "\$NCBI_EMAIL" + ncbi_key = "\$NCBI_KEY" } } diff --git a/tests/pipeline/test_taxa_specific_assembly.nf.test b/tests/pipeline/test_taxa_specific_assembly.nf.test index c8f1c508..dd39e463 100644 --- a/tests/pipeline/test_taxa_specific_assembly.nf.test +++ b/tests/pipeline/test_taxa_specific_assembly.nf.test @@ -10,8 +10,8 @@ nextflow_pipeline { when { params { outdir = "$outputDir" - ncbi_email = "$NCBI_EMAIL" - ncbi_key = "$NCBI_KEY" + ncbi_email = "\$NCBI_EMAIL" + ncbi_key = "\$NCBI_KEY" } }