-
Notifications
You must be signed in to change notification settings - Fork 21
[WIP] test script and venv requirements #55
base: master
Are you sure you want to change the base?
Conversation
yeah, should be fine, the diff between 0.14.0 and what parsec was pinned to, should be very minimal.
this is everything that's in jenkins currently. And the following glob chooses which files to archive:
|
test_workflows.sh
Outdated
[ ! $GALAXY_URL ] || [ ! $GALAXY_USER_KEY ] && source .secret.env | ||
export GALAXY_URL GALAXY_USER_KEY | ||
|
||
virtualenv -p python3 .venv; . .venv/bin/activate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On jenkins this is done through a plugin that creates a venv (shining panda), so this step isn't necessary. But the pip install is useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably best to pip install -r requirements.txt
within code on jenkins
rm -f ~/.parsec.yml ||: | ||
parsec init --url $GALAXY_URL --api_key $GALAXY_USER_KEY # caution: if ~/.parsec.yml already exists at this point it will not be updated | ||
|
||
workflow_list=workflows_to_test.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
workflow_list=workflows_to_test.txt | |
workflow_list=$(mktemp) |
# 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've never seen this construction before, cool! 👍
|
||
# 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merged test reports will be SO much nicer!!
@hexylena thanks for reviewing. I've taken out a few lines. There will be more that needs to change because I hadn't considered that Jenkins was running a build for each test. So the workflow_list and the test_output folder will both need to be outside of the repo. |
Or we can switch it to running a single build! I used the multi-build strategy only because I wanted the nice pass/fail badges for each WF, but, this looks so much more conceptually simple/correct than the old design (where updating the workflow list was super difficult) that it's definitely worth sacrificing the badges for, we can find another, better solution for those. |
A script to clone training-material and find workflows with tests then run the tests + non-GTN-workflow tests in this repo.
The virtual environment requires planemo and parsec. There is a conflict installing these requirements and it ends up using bioblend version 0.14.0 which is too new for parsec, but this seems to be fine for the parsec calls used in the script.
@bgruening what code is on Jenkins for this currently? I'd like to make the history.html links and the planemo reports available after the test run. The planemo report is useful if the test has failed because of tool versions, history links are useful for just about everything else.
TODO: Makefile, automatic updating of the readme