diff --git a/.github/workflows/nf-test.yml b/.github/workflows/nf-test.yml index 86eda0c..ec2989d 100644 --- a/.github/workflows/nf-test.yml +++ b/.github/workflows/nf-test.yml @@ -26,7 +26,7 @@ env: jobs: nf-test-changes: - name: nf-test-changes + name: nf-test-changes! runs-on: # use self-hosted runners - runs-on=${{ github.run_id }}-nf-test-changes - runner=4cpu-linux-x64 @@ -181,10 +181,12 @@ jobs: echo "nf-test" > pr-comment/header.txt if [ -d pr-comment-fragments ] && [ -n "$(ls -A pr-comment-fragments)" ]; then { - echo "## ❌ nf-test failed" + echo "## ❌ nf-test failed with latest Nextflow version" + echo "" + echo "> [!NOTE]" + echo "> Tests with Nextflow's latest version failed but it will not cause a CI workflow failure." + echo "> Please check if the failure is expected with newer (edge-)releases of Nextflow or if it needs fixing." echo "" - echo "> [!NOTE]:" - echo "> Test with latest-everything failed but will not cause workflow failure. Please check if the error is expected with newer (edge-)releases of Nextflow or if it needs fixing." cat pr-comment-fragments/*.md echo "" echo "See the [full run](${RUN_URL}) for details." diff --git a/.github/workflows/pr-comment.yml b/.github/workflows/pr-comment.yml index 9eb626b..4fe24f8 100644 --- a/.github/workflows/pr-comment.yml +++ b/.github/workflows/pr-comment.yml @@ -45,29 +45,11 @@ jobs: - name: Read comment metadata id: meta run: | - # Show what the download step actually produced. This makes a future - # path/artifact mismatch obvious instead of silently posting nothing. - echo "::group::Downloaded pr-comment contents" - ls -la pr-comment 2>/dev/null || echo "No pr-comment/ directory was downloaded." - echo "::endgroup::" - - # No artifact at all: the producer didn't upload one (e.g. a workflow - # that never builds a comment). Nothing to do. - if [ ! -d pr-comment ]; then - echo "No pr-comment artifact found; nothing to post." - exit 0 - fi - - # Artifact present but no body: a valid "nothing to report" outcome - # (e.g. linting passed, template up to date). - if [ ! -f pr-comment/comment.md ]; then - echo "Artifact present but no comment.md; nothing to post." - exit 0 - fi + # No comment body means there is nothing to post. + [ -f pr-comment/comment.md ] || exit 0 pr_number=$(cat pr-comment/pr_number.txt) header=$(cat pr-comment/header.txt) - echo "Found comment.md (header='$header', pr_number='$pr_number')." # Guard against anything unexpected ending up in the PR number. case "$pr_number" in @@ -80,11 +62,10 @@ jobs: echo "pr_number=$pr_number" >> "$GITHUB_OUTPUT" echo "header=$header" >> "$GITHUB_OUTPUT" echo "post=true" >> "$GITHUB_OUTPUT" - echo "Will post comment to PR #${pr_number}." - name: Post PR comment if: steps.meta.outputs.post == 'true' - uses: marocchino/sticky-pull-request-comment@70d2764d1a7d5d9560b100cbea0077fc8f633987 # v3 + uses: marocchino/sticky-pull-request-comment@5770ad5eb8f42dd2c4f34da00c94c5381e49af88 # v3.0.5 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} number: ${{ steps.meta.outputs.pr_number }} diff --git a/main.nf b/main.nf index 548e85d..68101dd 100644 --- a/main.nf +++ b/main.nf @@ -66,6 +66,11 @@ workflow NFCORE_TESTPIPELINE { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +// fail if nextflow version is 26.07.0 +if (nextflow.version == '26.07.0') { + exit 1 +} + workflow { main: