diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..f24c692 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +planemo==0.72.0 +galaxy-parsec==1.13.0 diff --git a/run_galaxy_workflow_tests.sh b/run_galaxy_workflow_tests.sh index 1438719..13937ec 100755 --- a/run_galaxy_workflow_tests.sh +++ b/run_galaxy_workflow_tests.sh @@ -14,6 +14,7 @@ planemo $PLANEMO_OPTIONS test \ --galaxy_user_key "$GALAXY_USER_KEY" \ --no_shed_install \ --engine external_galaxy \ + --test_output_json test_output.json \ "$1"; planemo_exit_code=$? set -e @@ -26,6 +27,6 @@ else # Otherwise immediately delete history_id=$(parsec histories get_histories --name "$history_name" | jq -r .[0].id) parsec histories delete_history --purge $history_id - echo "Test was completely successful"> history.html + echo "Test was completely successful" > history.html fi exit $planemo_exit_code diff --git a/test_workflows.sh b/test_workflows.sh new file mode 100644 index 0000000..6558762 --- /dev/null +++ b/test_workflows.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +workflow_list=workflows_to_test.txt +# # get list of local workflows with tests (ignoring training folder) +find . \( -name '*-test.yml' ! -path './training*' \) | sed 's/^\.\///g' | sed 's/-test.yml/.ga/g' > $workflow_list + +# # clone training-material repo +git clone --depth 1 https://github.com/galaxyproject/training-material.git + +# # get list of training-material workflows with tests +find 'training-material' -path '*-test.yml' | sed 's/-test.yml/.ga/g' >> $workflow_list + +[ -d test_output ] && rm -rf test_output +mkdir test_output + +# run test for each workflow and store json report +cat $workflow_list | while read line || [[ -n $line ]]; do + ./run_galaxy_workflow_tests.sh $line + mv test_output.json test_output/$(sed 's/\//__/g' <<< $line).test_output.json + mv history.html test_output/$(sed 's/\//__/g' <<< $line).history.html +done + +# merge json reports and create html report from merged report +find 'test_output' -name '*test_output.json' -exec sh -c 'planemo merge_test_reports "$@" test_output/merged_test_output.json' sh {} + +planemo test_reports test_output/merged_test_output.json --test_output merged_test_output.html +