Skip to content

Commit

Permalink
implement as infinite loop
Browse files Browse the repository at this point in the history
  • Loading branch information
bernt-matthias committed Jul 17, 2023
1 parent 5208067 commit 88ae1d8
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions planemo_ci_actions.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
#!/usr/bin/env bash
set -exo pipefail

# function running an infinite loop pruning (unused) docker images
function background_prune_docker {
while 1; do
docker system prune --all --volumes
sleep 60
done
}

PLANEMO_TEST_OPTIONS=("--database_connection" "$DATABASE_CONNECTION" "--galaxy_source" "https://github.com/$GALAXY_FORK/galaxy" "--galaxy_branch" "$GALAXY_BRANCH" "--galaxy_python_version" "$PYTHON_VERSION" --test_timeout "$TEST_TIMEOUT")
PLANEMO_CONTAINER_DEPENDENCIES=("--biocontainers" "--no_dependency_resolution" "--no_conda_auto_init" "--docker_extra_volume" "./")
PLANEMO_WORKFLOW_OPTIONS=("--tool_data_table" "/cvmfs/data.galaxyproject.org/managed/location/tool_data_table_conf.xml" "--tool_data_table" "/cvmfs/data.galaxyproject.org/byhand/location/tool_data_table_conf.xml" "--docker_extra_volume" "/cvmfs" --shed_tool_conf /tmp/shed_tool_conf.xml --shed_tool_path /tmp/shed_dir)
Expand Down Expand Up @@ -152,12 +160,14 @@ if [ "$MODE" == "test" ]; then

# show tools
cat tool_list_chunk.txt


background_prune_docker &
PRUNE_PID=$!

# Test tools
mkdir -p json_output
touch .tt_biocontainer_skip
while read -r -a TOOL_GROUP; do
docker system prune --all --force --volumes || true
# Check if any of the lines in .tt_biocontainer_skip is a substring of $TOOL_GROUP
if echo "${TOOL_GROUP[@]}" | grep -qf .tt_biocontainer_skip; then
PLANEMO_OPTIONS=()
Expand All @@ -179,6 +189,7 @@ if [ "$MODE" == "test" ]; then
planemo test_reports tool_test_output.json --test_output tool_test_output.html

mv tool_test_output.json tool_test_output.html upload/
kill "$PRUNE_PID"
fi

# combine reports mode
Expand Down

0 comments on commit 88ae1d8

Please sign in to comment.