Skip to content

Commit

Permalink
fix syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
mashehu committed Jan 9, 2025
1 parent cc9819b commit bca2025
Showing 1 changed file with 25 additions and 26 deletions.
51 changes: 25 additions & 26 deletions .github/workflows/nf-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 != '[]'}}
Expand Down

0 comments on commit bca2025

Please sign in to comment.