From 27ba5ffdf3e4f8f8bd27060b655ab99e4c831e58 Mon Sep 17 00:00:00 2001 From: mashehu Date: Tue, 19 Nov 2024 14:28:59 +0100 Subject: [PATCH 1/7] NFTEST_VERSION -> NFT_VER --- .github/actions/nf-test-action/action.yml | 2 +- .github/workflows/gpu-tests.yml | 2 +- .github/workflows/nf-test.yml | 2 +- .github/workflows/wave.yml | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/actions/nf-test-action/action.yml b/.github/actions/nf-test-action/action.yml index b45e04d467a..1fdfcd83a98 100644 --- a/.github/actions/nf-test-action/action.yml +++ b/.github/actions/nf-test-action/action.yml @@ -35,7 +35,7 @@ runs: - name: Install nf-test uses: nf-core/setup-nf-test@v1 with: - version: "${{ env.NFTEST_VERSION }}" + version: "${{ env.NFT_VER }}" install-pdiff: true - name: Setup apptainer diff --git a/.github/workflows/gpu-tests.yml b/.github/workflows/gpu-tests.yml index 92188ed9702..88b5ac6397b 100644 --- a/.github/workflows/gpu-tests.yml +++ b/.github/workflows/gpu-tests.yml @@ -30,7 +30,7 @@ concurrency: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # renovate: datasource=github-releases depName=askimed/nf-test versioning=semver - NFTEST_VERSION: "0.9.2" + NFT_VER: "0.9.2" NXF_ANSI_LOG: false NXF_SINGULARITY_CACHEDIR: ${{ github.workspace }}/.singularity NXF_SINGULARITY_LIBRARYDIR: ${{ github.workspace }}/.singularity diff --git a/.github/workflows/nf-test.yml b/.github/workflows/nf-test.yml index 6eb3525404a..21f25628b6c 100644 --- a/.github/workflows/nf-test.yml +++ b/.github/workflows/nf-test.yml @@ -27,7 +27,7 @@ concurrency: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # renovate: datasource=github-releases depName=askimed/nf-test versioning=semver - NFTEST_VERSION: "0.9.2" + NFT_VER: "0.9.2" NXF_ANSI_LOG: false NXF_SINGULARITY_CACHEDIR: ${{ github.workspace }}/.singularity NXF_SINGULARITY_LIBRARYDIR: ${{ github.workspace }}/.singularity diff --git a/.github/workflows/wave.yml b/.github/workflows/wave.yml index 61d0d06a509..8e5df5b6c59 100644 --- a/.github/workflows/wave.yml +++ b/.github/workflows/wave.yml @@ -13,7 +13,7 @@ env: # renovate: datasource=github-releases depName=seqeralabs/wave-cli versioning=semver WAVE_VERSION: "1.5.0" # renovate: datasource=github-releases depName=askimed/nf-test versioning=semver - NFTEST_VERSION: "0.9.1" + NFT_VER: "0.9.1" # renovate: datasource=github-releases depName=nextflow/nextflow versioning=semver NXF_VERSION: "24.10.1" @@ -143,7 +143,7 @@ jobs: # - uses: nf-core/setup-nf-test@v1 # with: - # version: ${{ env.NFTEST_VERSION }} + # version: ${{ env.NFT_VER }} # - name: Bump Snapshot Versions # env: From ee2b852001ee092740df6530140672385b0d4875 Mon Sep 17 00:00:00 2001 From: mashehu Date: Tue, 19 Nov 2024 14:53:47 +0100 Subject: [PATCH 2/7] add detect-changes step back --- .github/workflows/gpu-tests.yml | 41 +++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/.github/workflows/gpu-tests.yml b/.github/workflows/gpu-tests.yml index 88b5ac6397b..1d38387cbf2 100644 --- a/.github/workflows/gpu-tests.yml +++ b/.github/workflows/gpu-tests.yml @@ -38,19 +38,50 @@ env: NXF_VERSION: "24.10.1" jobs: + nf-test-changes: + name: nf-test-changes + runs-on: ubuntu-latest + outputs: + # Expose detected tags as 'modules' and 'workflows' output variables + paths: ${{ steps.list.outputs.components }} + modules: ${{ steps.outputs.outputs.modules }} + subworkflows: ${{ steps.outputs.outputs.subworkflows}} + # Prod for version bumping + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + with: + fetch-depth: 0 + + - name: List nf-test files + id: list + uses: adamrtalbot/detect-nf-test-changes@e114e734c3bfa4599151087dcbc457ff38e5bf2c + with: + head: ${{ github.sha }} + base: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha }} + n_parents: 2 + tags: "gpu" + + - name: Separate modules and subworkflows + id: outputs + run: | + echo modules=$(echo '${{ steps.list.outputs.components }}' | jq -c '. | map(select(contains("modules"))) | map(gsub("modules/nf-core/"; ""))') >> $GITHUB_OUTPUT + echo subworkflows=$(echo '${{ steps.list.outputs.components }}' | jq '. | map(select(contains("subworkflows"))) | map(gsub("subworkflows/nf-core/"; ""))') >> $GITHUB_OUTPUT + - name: debug + run: | + echo ${{ steps.filter.outputs.components }} + echo ${{ steps.outputs.outputs.modules }} + echo ${{ steps.outputs.outputs.subworkflows }} + nf-test-gpu: runs-on: "gpu" + needs: nf-test-changes name: "GPU | ${{ matrix.tags}} | ${{ matrix.profile }} | ${{ matrix.shard }}" strategy: fail-fast: false matrix: shard: [1, 2] profile: [docker_self_hosted, singularity] # conda? - # TODO Pass these in from GitHub PR trigger events - tags: - - parabricks/applybqsr - - parabricks/fq2bam - - parabricks/fq2bammeth + tags: ${{ fromJSON(needs.nf-test-changes.outputs.modules) && fromJSON(needs.nf-test-changes.outputs.subworkflows) }} env: NXF_ANSI_LOG: false TOTAL_SHARDS: 2 From 117e3d5896aab846a91e4a768bf7098eb8778838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20H=C3=B6rtenhuber?= Date: Tue, 19 Nov 2024 14:56:12 +0100 Subject: [PATCH 3/7] Update .github/workflows/wave.yml Co-authored-by: Sateesh_Peri <33637490+sateeshperi@users.noreply.github.com> --- .github/workflows/wave.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wave.yml b/.github/workflows/wave.yml index 8e5df5b6c59..2c04a0355c0 100644 --- a/.github/workflows/wave.yml +++ b/.github/workflows/wave.yml @@ -13,7 +13,7 @@ env: # renovate: datasource=github-releases depName=seqeralabs/wave-cli versioning=semver WAVE_VERSION: "1.5.0" # renovate: datasource=github-releases depName=askimed/nf-test versioning=semver - NFT_VER: "0.9.1" + NFT_VER: "0.9.2" # renovate: datasource=github-releases depName=nextflow/nextflow versioning=semver NXF_VERSION: "24.10.1" From bad7869857bb585478c02319f6ce7df30dbd0053 Mon Sep 17 00:00:00 2001 From: mashehu Date: Tue, 19 Nov 2024 15:01:06 +0100 Subject: [PATCH 4/7] add check for no-changes --- .github/workflows/gpu-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/gpu-tests.yml b/.github/workflows/gpu-tests.yml index 1d38387cbf2..06c990b4a6e 100644 --- a/.github/workflows/gpu-tests.yml +++ b/.github/workflows/gpu-tests.yml @@ -75,6 +75,7 @@ jobs: nf-test-gpu: runs-on: "gpu" needs: nf-test-changes + if: ${{ fromJSON(needs.nf-test-changes.outputs.paths) != '[]' }} name: "GPU | ${{ matrix.tags}} | ${{ matrix.profile }} | ${{ matrix.shard }}" strategy: fail-fast: false From 49149344975e2f53bd6a5527a7d563fce9de9e0f Mon Sep 17 00:00:00 2001 From: mashehu Date: Tue, 19 Nov 2024 15:32:22 +0100 Subject: [PATCH 5/7] check for empty modules --- .github/workflows/gpu-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gpu-tests.yml b/.github/workflows/gpu-tests.yml index 06c990b4a6e..963ac8ab68f 100644 --- a/.github/workflows/gpu-tests.yml +++ b/.github/workflows/gpu-tests.yml @@ -75,7 +75,7 @@ jobs: nf-test-gpu: runs-on: "gpu" needs: nf-test-changes - if: ${{ fromJSON(needs.nf-test-changes.outputs.paths) != '[]' }} + if: ${{ fromJSON(needs.nf-test-changes.outputs.modules) != '[]' || fromJSON(needs.nf-test-changes.outputs.subworkflows) != '[]' }} name: "GPU | ${{ matrix.tags}} | ${{ matrix.profile }} | ${{ matrix.shard }}" strategy: fail-fast: false From d45a1dd202732940000303e7553bdd5bb0061487 Mon Sep 17 00:00:00 2001 From: mashehu Date: Tue, 19 Nov 2024 15:44:58 +0100 Subject: [PATCH 6/7] add exit step --- .github/workflows/gpu-tests.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/gpu-tests.yml b/.github/workflows/gpu-tests.yml index 963ac8ab68f..44488551660 100644 --- a/.github/workflows/gpu-tests.yml +++ b/.github/workflows/gpu-tests.yml @@ -61,6 +61,12 @@ jobs: n_parents: 2 tags: "gpu" + - name: Exit early if no changes + if: ${{ fromJSON(steps.list.outputs.components) == '[]' }} + run: | + echo "No GPU test changes detected - skipping tests" + exit 0 + - name: Separate modules and subworkflows id: outputs run: | From bc97489b492c436a7d3a13787d748bef90d5c2c2 Mon Sep 17 00:00:00 2001 From: mashehu Date: Tue, 19 Nov 2024 15:59:28 +0100 Subject: [PATCH 7/7] test different kind of empty values --- .github/workflows/gpu-tests.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/gpu-tests.yml b/.github/workflows/gpu-tests.yml index 44488551660..052b00b9023 100644 --- a/.github/workflows/gpu-tests.yml +++ b/.github/workflows/gpu-tests.yml @@ -61,12 +61,6 @@ jobs: n_parents: 2 tags: "gpu" - - name: Exit early if no changes - if: ${{ fromJSON(steps.list.outputs.components) == '[]' }} - run: | - echo "No GPU test changes detected - skipping tests" - exit 0 - - name: Separate modules and subworkflows id: outputs run: | @@ -81,7 +75,7 @@ jobs: nf-test-gpu: runs-on: "gpu" needs: nf-test-changes - if: ${{ fromJSON(needs.nf-test-changes.outputs.modules) != '[]' || fromJSON(needs.nf-test-changes.outputs.subworkflows) != '[]' }} + if: ${{ fromJSON(needs.nf-test-changes.outputs.paths) != '[]' || needs.nf-test-changes.outputs.paths != '' }} name: "GPU | ${{ matrix.tags}} | ${{ matrix.profile }} | ${{ matrix.shard }}" strategy: fail-fast: false