Skip to content

Commit

Permalink
Merge pull request #12 from bernt-matthias/topic/count-all-tools-in-repo
Browse files Browse the repository at this point in the history
count all tools in changed repo to get chunk count
  • Loading branch information
mvdbeek authored Feb 7, 2021
2 parents e2e616a + f4f065a commit a7fb201
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions planemo_ci_actions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,22 @@ if [ "$REPOSITORIES" == "" ] && [ "$MODE" == "setup" ]; then

touch tool_list.txt
if [ "$WORKFLOWS" != "true" ]; then
# TODO check: run ci_find_tools on complete repo has the advantage that it can be reused in the linting step
planemo ci_find_tools "${PLANEMO_COMMIT_RANGE[@]}" --exclude packages --exclude deprecated --exclude_from .tt_skip --output tool_list.txt
TOOLS=$(cat tool_list.txt)
# if [ -s repository_list.txt ]; then
# planemo ci_find_tools --output tool_list.txt $(cat repository_list.txt)
# fi
fi

# determine the number of chunks to use as linear function of the number of
# tested tools (i.e. all tools in the changed repos)
if [ "$WORKFLOWS" != "true" ]; then
ln -s tool_list.txt count_list.txt
if [ -s repository_list.txt ]; then
if [ -n "$COMMIT_RANGE" ]; then
mapfile -t REPO_ARRAY < repository_list.txt
planemo ci_find_tools --output count_list.txt "${REPO_ARRAY[@]}"
else
ln -s tool_list.txt count_list.txt
fi
fi
touch count_list.txt
else
ln -s repository_list.txt count_list.txt
fi
Expand Down

0 comments on commit a7fb201

Please sign in to comment.