Skip to content

Commit

Permalink
lint: do not exit on first failing tool
Browse files Browse the repository at this point in the history
  • Loading branch information
bernt-matthias committed Dec 15, 2023
1 parent da9a8bc commit fcc0286
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions planemo_ci_actions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,27 +109,32 @@ fi
# - call `planemo lint` for each repo
# - check if each tool is in a repo (i.e. if `.shed.yml` is present)
if [ "$MODE" == "lint" ]; then
lint_fail=false
mapfile -t REPO_ARRAY < repository_list.txt
for DIR in "${REPO_ARRAY[@]}"; do
if [ "$WORKFLOWS" != "true" ]; then
planemo shed_lint --tools --ensure_metadata --urls --report_level "$REPORT_LEVEL" --fail_level "$FAIL_LEVEL" --recursive "$DIR" "${ADDITIONAL_PLANEMO_OPTIONS[@]}" | tee -a lint_report.txt
else
planemo workflow_lint --report_level "$REPORT_LEVEL" --fail_level "$FAIL_LEVEL" "$DIR" "${ADDITIONAL_PLANEMO_OPTIONS[@]}" | tee -a lint_report.txt
fi
if [ "${PIPESTATUS[0]}" -ne 0 ]; then
lint_fail=true
fi
done

# Check if each changed tool is in the list of changed repositories
mapfile -t TOOL_ARRAY < tool_list.txt
for TOOL in "${TOOL_ARRAY[@]}"; do
# Check if any changed repo dir is a substring of $TOOL
if ! echo "$TOOL" | grep -qf repository_list.txt; then
echo "Tool $TOOL not in changed repositories list: .shed.yml file missing" >&2
exit 1
lint_fail=true
fi
done
if $lint_fail; then
exit 1
fi
fi


# test mode
# - compute grouped chunked tool list
# - run `planemo test` each tool group
Expand Down

0 comments on commit fcc0286

Please sign in to comment.