From f3f7abcca13fbf68a60cb364d074c5e576904726 Mon Sep 17 00:00:00 2001 From: Matthias Zepper Date: Fri, 2 Feb 2024 12:41:12 +0100 Subject: [PATCH 1/3] Download CI Test: Set dev as the default branch and add customisation option for manual dispatch. --- .../.github/workflows/download_pipeline.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nf_core/pipeline-template/.github/workflows/download_pipeline.yml b/nf_core/pipeline-template/.github/workflows/download_pipeline.yml index 31cf61f358..a6619b7bd9 100644 --- a/nf_core/pipeline-template/.github/workflows/download_pipeline.yml +++ b/nf_core/pipeline-template/.github/workflows/download_pipeline.yml @@ -6,6 +6,11 @@ name: Test successful pipeline download with 'nf-core download' # - the head branch of the pull request is updated, i.e. if fixes for a release are pushed last minute to dev. on: workflow_dispatch: + inputs: + testbranch: + description: "The branch to test the pipeline download." + required: true + default: "dev" pull_request: types: - opened @@ -42,7 +47,7 @@ jobs: run: | echo "REPO_LOWERCASE=${GITHUB_REPOSITORY,,}" >> ${GITHUB_ENV} echo "REPOTITLE_LOWERCASE=$(basename ${GITHUB_REPOSITORY,,})" >> ${GITHUB_ENV} - echo "REPO_BRANCH=${GITHUB_REF#refs/heads/}" >> ${GITHUB_ENV} + echo "REPO_BRANCH=${{ github.event.inputs.testbranch || 'dev' }}" >> ${GITHUB_ENV} - name: Download the pipeline env: From de73d39fbd7391cda5af4de2de0bce6cea3a605a Mon Sep 17 00:00:00 2001 From: Matthias Zepper Date: Fri, 2 Feb 2024 16:18:37 +0100 Subject: [PATCH 2/3] Update Changelog. --- CHANGELOG.md | 3 ++- .../pipeline-template/.github/workflows/download_pipeline.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2de939183c..b23787d61d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Template - Add empty line in README.md to fix badges. ([#2729](https://github.com/nf-core/tools/pull/2729)) +- Replace automatic branch detection in `nf-core download` CI test with hardcoded `dev` and input. ([#2727](https://github.com/nf-core/tools/pull/2727)) ### Linting @@ -35,7 +36,7 @@ ### Template -- Add a Github Action Workflow to the pipeline template that tests a successful download with 'nf-core download' ([#2618](https://github.com/nf-core/tools/pull/2618)) +- Add a Github Action Workflow to the pipeline template that tests a successful download with `nf-core download` ([#2618](https://github.com/nf-core/tools/pull/2618)) - Use `pre-commit` to lint files in GitHub CI ([#2635](https://github.com/nf-core/tools/pull/2635)) - Use pdiff also on gitpod for nf-test ([#2640](https://github.com/nf-core/tools/pull/2640)) - switch to new image syntax in readme ([#2645](https://github.com/nf-core/tools/pull/2645)) diff --git a/nf_core/pipeline-template/.github/workflows/download_pipeline.yml b/nf_core/pipeline-template/.github/workflows/download_pipeline.yml index a6619b7bd9..a828882f7f 100644 --- a/nf_core/pipeline-template/.github/workflows/download_pipeline.yml +++ b/nf_core/pipeline-template/.github/workflows/download_pipeline.yml @@ -8,7 +8,7 @@ on: workflow_dispatch: inputs: testbranch: - description: "The branch to test the pipeline download." + description: "The specific branch you wish to utilize for the test execution of nf-core download." required: true default: "dev" pull_request: From 90dd79372ca6fc82f09692e5e1b5baa86d8ae2fd Mon Sep 17 00:00:00 2001 From: mashehu Date: Tue, 6 Feb 2024 17:56:25 +0100 Subject: [PATCH 3/3] fix trailing whitespace --- .../pipeline-template/.github/workflows/download_pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/pipeline-template/.github/workflows/download_pipeline.yml b/nf_core/pipeline-template/.github/workflows/download_pipeline.yml index a828882f7f..08fc30c936 100644 --- a/nf_core/pipeline-template/.github/workflows/download_pipeline.yml +++ b/nf_core/pipeline-template/.github/workflows/download_pipeline.yml @@ -69,4 +69,4 @@ jobs: env: NXF_SINGULARITY_CACHEDIR: ./ NXF_SINGULARITY_HOME_MOUNT: true - run: nextflow run ./${{ env.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ env.REPO_BRANCH }}) -stub -profile test,singularity --outdir ./results {% endraw %} + run: nextflow run ./${{ env.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ env.REPO_BRANCH }}) -stub -profile test,singularity --outdir ./results{% endraw %}