Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/nf-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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."
Expand Down
25 changes: 3 additions & 22 deletions .github/workflows/pr-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand Down
5 changes: 5 additions & 0 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ workflow NFCORE_TESTPIPELINE {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/

// fail if nextflow version is 26.07.0
if (nextflow.version == '26.07.0') {
exit 1
}
Comment thread
nvnieuwk marked this conversation as resolved.

workflow {

main:
Expand Down
Loading