From bca20251da3fee1a4daff0e805c1e6f97e18f3ce Mon Sep 17 00:00:00 2001 From: mashehu Date: Thu, 9 Jan 2025 12:45:20 +0100 Subject: [PATCH] fix syntax --- .github/workflows/nf-test.yml | 51 +++++++++++++++++------------------ 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/.github/workflows/nf-test.yml b/.github/workflows/nf-test.yml index 7e3e1ba3314..00e66a13f9c 100644 --- a/.github/workflows/nf-test.yml +++ b/.github/workflows/nf-test.yml @@ -101,32 +101,31 @@ jobs: --arg profile "${{ matrix.profile }}" \ --argjson input_paths "$PATHS" \ ' - def get_skip_list: inputs | .[$profile] // []; - def log_debug($msg): $msg | "::debug::" + . ; - - # Get skip list and filter - get_skip_list as $skip_patterns | - - # Log skip patterns - ($skip_patterns | map(" - " + .) | join("\n") | log_debug("Skip patterns:\n" + .)) | debug | - - # Do the filtering - $input_paths | map( - . as $path | - select($skip_patterns | all(. as $pattern | ($path | startswith($pattern)) | not)) - ) as $result | - - # Log skipped paths - (if ($input_paths - $result) | length > 0 then - ($input_paths - $result) | map(" - " + .) | join("\n") | log_debug("Skipped:\n" + .) - else - log_debug("No paths skipped") - end) | debug | - - $result - ' .github/skip_nf_test.json) - - echo "filtered_paths=${FILTERED}" >> $GITHUB_OUTPUT + def get_skip_list: inputs | .[$profile] // []; + def log_debug($msg): $msg | "::debug::" + . ; + + # Get skip list and filter + get_skip_list as $skip_patterns | + + # Log skip patterns + ($skip_patterns | map(" - " + .) | join("\n") | log_debug("Skip patterns:\n" + .)) | debug | + + # Do the filtering + $input_paths | map( + . as $path | + select($skip_patterns | all(. as $pattern | ($path | startswith($pattern)) | not)) + ) as $result | + + # Log skipped paths + (if ($input_paths - $result) | length > 0 then + ($input_paths - $result) | map(" - " + .) | join("\n") | log_debug("Skipped:\n" + .) + else + log_debug("No paths skipped") + end) | debug | + + $result + ' .github/skip_nf_test.json) + echo "filtered_paths=${FILTERED}" >> $GITHUB_OUTPUT - name: Run nf-test Action if: ${{steps.filter.outputs.filtered_paths != '[]'}}