Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Carrot setup #1721

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .carrot/carrot_eval.wdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
version 1.0

task compare {
input {
String result
String image_to_use
}
command {
echo "Checking the result from previous test:"
echo "~{result}"
}
runtime {
docker: image_to_use
}
output {
File comparison_result = stdout()
}
}

workflow eval_workflow {
input {
String result
String image_to_use
}
call compare {
input:
result = result,
image_to_use = image_to_use
}
output {
File comparison_result = compare.comparison_result
}
}
35 changes: 35 additions & 0 deletions .carrot/carrot_test.wdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
version 1.0

task test_htsjdk {
input {
File input_file
String image_to_use
}
command {
echo "pretending to run test on ~{input_file}"
}
runtime {
docker: image_to_use
}

output {
String result = stdout()
}
}

workflow test_workflow {
input {
File input_file
String image_to_use
}
call test_htsjdk {
input:
input_file = input_file,
image_to_use = image_to_use
}
output {
String result = test_htsjdk.result
}
}


4 changes: 4 additions & 0 deletions .carrot/eval.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"eval_workflow.result": "test_output:test_workflow.result"
}

4 changes: 4 additions & 0 deletions .carrot/eval_defaults.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"eval_workflow.image_to_use": "ubuntu:latest"
}

1 change: 1 addition & 0 deletions .carrot/run_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python3.10 -m carrot_cli test run --test_input test.json --eval_input eval.json 36d33423-15a5-4d8b-aa5d-cb04eb6f6017
4 changes: 4 additions & 0 deletions .carrot/test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"test_workflow.image_to_use": "ubuntu:latest"
}

3 changes: 3 additions & 0 deletions .carrot/test_defaults.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"test_workflow.input_file": "gs://hellbender/test/resources/nio/big.txt"
}
1 change: 1 addition & 0 deletions .carrot/update_wdls.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python3.10 -m carrot_cli template update 03ff49e8-40ee-411e-b16f-f43b377cb6e9 --test_wdl carrot_test.wdl --eval_wdl carrot_eval.wdl
16 changes: 16 additions & 0 deletions .github/workflows/carrot_run_test_from_pr_comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: carrot-test-run-from-pr-comment
on:
issue_comment:
types: [created]
jobs:
publish-test:
runs-on: ubuntu-18.04
steps:
- name: Parse comment
uses: broadinstitute/[email protected]
with:
software-name: gatk
github-token: ${{ secrets.GITHUB_TOKEN }}
topic-name: ${{ secrets.CARROT_TOPIC_NAME }}
sa-key: ${{ secrets.CARROT_SA_KEY }}
minimum-permissions: write
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This docker build is here to enable Carrot tests
# It's not intended for any other purpose
FROM eclipse-temurin:17

COPY . .
RUN ./gradlew compileTestJava
ENTRYPOINT bash
Loading