From e35d04f94efc7e282dcc17eefb094fb623b3b796 Mon Sep 17 00:00:00 2001 From: sofstam Date: Thu, 9 Jan 2025 10:38:50 +0100 Subject: [PATCH 1/4] Test fix for downloading --- .github/workflows/download_pipeline.yml | 36 ++++++++++++++----------- CHANGELOG.md | 4 +-- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/.github/workflows/download_pipeline.yml b/.github/workflows/download_pipeline.yml index 13b51e2c..2b85306e 100644 --- a/.github/workflows/download_pipeline.yml +++ b/.github/workflows/download_pipeline.yml @@ -29,11 +29,22 @@ env: jobs: configure: - runs-on: ubuntu-latest + runs-on: ubuntu-latest{% raw %} outputs: REPO_LOWERCASE: ${{ steps.get_repo_properties.outputs.REPO_LOWERCASE }} REPOTITLE_LOWERCASE: ${{ steps.get_repo_properties.outputs.REPOTITLE_LOWERCASE }} REPO_BRANCH: ${{ steps.get_repo_properties.outputs.REPO_BRANCH }} + steps: + - name: Get the repository name and current branch + id: get_repo_properties + run: | + echo "REPO_LOWERCASE=${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT" + echo "REPOTITLE_LOWERCASE=$(basename ${GITHUB_REPOSITORY,,})" >> "$GITHUB_OUTPUT" + echo "REPO_BRANCH=${{ github.event.inputs.testbranch || 'dev' }}" >> "$GITHUB_OUTPUT{% endraw %}" + + download: + runs-on: ubuntu-latest + needs: configure steps: - name: Install Nextflow uses: nf-core/setup-nextflow@v2 @@ -56,24 +67,13 @@ jobs: python -m pip install --upgrade pip pip install git+https://github.com/nf-core/tools.git@dev - - name: Get the repository name and current branch set as environment variable - id: get_repo_properties - run: | - echo "REPO_LOWERCASE=${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT" - echo "REPOTITLE_LOWERCASE=$(basename ${GITHUB_REPOSITORY,,})" >> "$GITHUB_OUTPUT" - echo "REPO_BRANCH=${{ github.event.inputs.testbranch || 'dev' }}" >> "$GITHUB_OUTPUT" - - name: Make a cache directory for the container images run: | mkdir -p ./singularity_container_images - download: - runs-on: ubuntu-latest - needs: configure - steps: - name: Download the pipeline env: - NXF_SINGULARITY_CACHEDIR: ./singularity_container_images + NXF_SINGULARITY_CACHEDIR: ./singularity_container_images{% raw %} run: | nf-core pipelines download ${{ needs.configure.outputs.REPO_LOWERCASE }} \ --revision ${{ needs.configure.outputs.REPO_BRANCH }} \ @@ -85,7 +85,10 @@ jobs: --download-configuration 'yes' - name: Inspect download - run: tree ./${{ needs.configure.outputs.REPOTITLE_LOWERCASE }} + run: tree ./${{ needs.configure.outputs.REPOTITLE_LOWERCASE }}{% endraw %}{% if test_config %}{% raw %} + + - name: Inspect container images + run: tree ./singularity_container_images | tee ./container_initial - name: Count the downloaded number of container images id: count_initial @@ -123,8 +126,9 @@ jobs: final_count=${{ steps.count_afterwards.outputs.IMAGE_COUNT_AFTER }} difference=$((final_count - initial_count)) echo "$difference additional container images were \n downloaded at runtime . The pipeline has no support for offline runs!" - tree ./singularity_container_images + tree ./singularity_container_images > ./container_afterwards + diff ./container_initial ./container_afterwards exit 1 else echo "The pipeline can be downloaded successfully!" - fi + fi{% endraw %}{% endif %} diff --git a/CHANGELOG.md b/CHANGELOG.md index 29ffb267..c4b443db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,12 +3,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## v1.2.2 - Bouncy Basenji Patch [2024-12-20] +## v1.2.2 - Bouncy Basenji Patch [2024-01-13] ### `Added` - [#558](https://github.com/nf-core/taxprofiler/pull/558) Updated to nf-core pipeline template v3.1.0 (added by @LilyAnderssonLee) -- [#565](https://github.com/nf-core/taxprofiler/pull/565) Update to nf-core pipeline template v3.1.1 (added by @LilyAnderssonLee) +- [#565](https://github.com/nf-core/taxprofiler/pull/565) Updated to nf-core pipeline template v3.1.1 (added by @LilyAnderssonLee) ### `Fixed` From e34c7a4875bccb9c7af31c53b5b1d93540aa28d4 Mon Sep 17 00:00:00 2001 From: sofstam Date: Thu, 9 Jan 2025 11:35:12 +0100 Subject: [PATCH 2/4] Check if the fix works when opening PR against dev --- .github/workflows/download_pipeline.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/download_pipeline.yml b/.github/workflows/download_pipeline.yml index 2b85306e..e937931f 100644 --- a/.github/workflows/download_pipeline.yml +++ b/.github/workflows/download_pipeline.yml @@ -19,6 +19,7 @@ on: branches: - main - master + - dev pull_request_target: branches: - main From a22afb218d6d7628bae03f9c5ab52542fa609875 Mon Sep 17 00:00:00 2001 From: sofstam Date: Thu, 9 Jan 2025 12:56:22 +0100 Subject: [PATCH 3/4] Remove the dev from branches --- .github/workflows/download_pipeline.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/download_pipeline.yml b/.github/workflows/download_pipeline.yml index e937931f..2b85306e 100644 --- a/.github/workflows/download_pipeline.yml +++ b/.github/workflows/download_pipeline.yml @@ -19,7 +19,6 @@ on: branches: - main - master - - dev pull_request_target: branches: - main From 6843bdf396d7e822b6a3f20fa3f62b05e741c09c Mon Sep 17 00:00:00 2001 From: sofstam Date: Thu, 9 Jan 2025 14:17:42 +0100 Subject: [PATCH 4/4] Test new fix --- .github/workflows/download_pipeline.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/download_pipeline.yml b/.github/workflows/download_pipeline.yml index 2b85306e..ab06316e 100644 --- a/.github/workflows/download_pipeline.yml +++ b/.github/workflows/download_pipeline.yml @@ -29,7 +29,7 @@ env: jobs: configure: - runs-on: ubuntu-latest{% raw %} + runs-on: ubuntu-latest outputs: REPO_LOWERCASE: ${{ steps.get_repo_properties.outputs.REPO_LOWERCASE }} REPOTITLE_LOWERCASE: ${{ steps.get_repo_properties.outputs.REPOTITLE_LOWERCASE }} @@ -40,7 +40,7 @@ jobs: run: | echo "REPO_LOWERCASE=${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT" echo "REPOTITLE_LOWERCASE=$(basename ${GITHUB_REPOSITORY,,})" >> "$GITHUB_OUTPUT" - echo "REPO_BRANCH=${{ github.event.inputs.testbranch || 'dev' }}" >> "$GITHUB_OUTPUT{% endraw %}" + echo "REPO_BRANCH=${{ github.event.inputs.testbranch || 'dev' }}" >> "$GITHUB_OUTPUT" download: runs-on: ubuntu-latest @@ -73,7 +73,7 @@ jobs: - name: Download the pipeline env: - NXF_SINGULARITY_CACHEDIR: ./singularity_container_images{% raw %} + NXF_SINGULARITY_CACHEDIR: ./singularity_container_images run: | nf-core pipelines download ${{ needs.configure.outputs.REPO_LOWERCASE }} \ --revision ${{ needs.configure.outputs.REPO_BRANCH }} \ @@ -85,7 +85,7 @@ jobs: --download-configuration 'yes' - name: Inspect download - run: tree ./${{ needs.configure.outputs.REPOTITLE_LOWERCASE }}{% endraw %}{% if test_config %}{% raw %} + run: tree ./${{ needs.configure.outputs.REPOTITLE_LOWERCASE }} - name: Inspect container images run: tree ./singularity_container_images | tee ./container_initial @@ -131,4 +131,4 @@ jobs: exit 1 else echo "The pipeline can be downloaded successfully!" - fi{% endraw %}{% endif %} + fi