From 1c7fa6f7af440dc9c880b1a852679b64f8f390f4 Mon Sep 17 00:00:00 2001 From: Adrienne Stilp Date: Tue, 21 May 2024 16:14:24 -0700 Subject: [PATCH 1/7] Start setting up a CI job to run cromwell I have no idea if this syntax will work. --- .github/workflows/ci.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1a5e467..57c4e69 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ on: branches: [ "master", "main" ] jobs: - build: + check_data_models: runs-on: ubuntu-latest strategy: matrix: @@ -38,3 +38,19 @@ jobs: run: | AnvilDataModels::json_to_dm("${{ matrix.data_model_file }}") shell: Rscript {0} + + check_test_data: + runs-on: ubuntu-latest + name: Check test model + steps: + + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up cromwell + uses: broadinstitute/cromwell/set_up_cromwell_action@f2b2c30 + with: + cromwell-version: "latest" + + - name: Success + run: echo "Success!" From 7f175f29c06d0484d0332c1250e32707a769980a Mon Sep 17 00:00:00 2001 From: Adrienne Stilp Date: Tue, 21 May 2024 16:18:06 -0700 Subject: [PATCH 2/7] Use tag instead of shortened commit SHA --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 57c4e69..478e503 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,7 +48,7 @@ jobs: uses: actions/checkout@v3 - name: Set up cromwell - uses: broadinstitute/cromwell/set_up_cromwell_action@f2b2c30 + uses: broadinstitute/cromwell/set_up_cromwell_action@87 with: cromwell-version: "latest" From 3748560ab9683940f35254137ba50fcd4ba8b401 Mon Sep 17 00:00:00 2001 From: Adrienne Stilp Date: Tue, 21 May 2024 16:19:28 -0700 Subject: [PATCH 3/7] Add filename to action.yml in "uses" step --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 478e503..3b993b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,7 +48,7 @@ jobs: uses: actions/checkout@v3 - name: Set up cromwell - uses: broadinstitute/cromwell/set_up_cromwell_action@87 + uses: broadinstitute/cromwell/set_up_cromwell_action/action.yml@87 with: cromwell-version: "latest" From b99ef01ae6e8490c7a3383105c6c217d36db3a1e Mon Sep 17 00:00:00 2001 From: Adrienne Stilp Date: Tue, 21 May 2024 16:21:11 -0700 Subject: [PATCH 4/7] Fix path to set up cromwell action I had forgotten the .github directory. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3b993b2..083de3b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,7 +48,7 @@ jobs: uses: actions/checkout@v3 - name: Set up cromwell - uses: broadinstitute/cromwell/set_up_cromwell_action/action.yml@87 + uses: broadinstitute/cromwell/.github/set_up_cromwell_action@87 with: cromwell-version: "latest" From 80b3312530f24c192161a6f8a095eccc55426b79 Mon Sep 17 00:00:00 2001 From: Adrienne Stilp Date: Tue, 21 May 2024 16:28:08 -0700 Subject: [PATCH 5/7] Set up java and cromwell without using the resuable action The set_up_cromwell_action wanted a token, so try just setting up java and checking out the cromwell repo without using the specific action. This allows us some more flexibility hopefully. --- .github/workflows/ci.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 083de3b..5b4e623 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,10 +47,23 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - - name: Set up cromwell - uses: broadinstitute/cromwell/.github/set_up_cromwell_action@87 + # Install Java to this VM. This Java version and distribution is compatible with Cromwell. + # This is the same step as used by broadinstitute/cromwell/.github/set_up_cromwell_action. + - name: Setup JDK + uses: actions/setup-java@v3 with: - cromwell-version: "latest" + distribution: temurin + java-version: 11 - - name: Success + # Clone the cromwell repo to this VM. + # This is the same step as used by broadinstitute/cromwell/.github/set_up_cromwell_action, + # but without a token and into a different directory. + - name: Clone Cromwell + uses: actions/checkout@v3 + with: + repository: broadinstitute/cromwell + ref: "87" + path: "cromwell" + + - name: Success! run: echo "Success!" From b7204a4bdf0a5b379db528e92bde15eb496dee80 Mon Sep 17 00:00:00 2001 From: Adrienne Stilp Date: Tue, 21 May 2024 16:34:18 -0700 Subject: [PATCH 6/7] Get the cromwell jar file from the release instead of cloning Instead of cloning the cromwell repository, download the jar from the release. --- .github/workflows/ci.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b4e623..90d5cc9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,7 +41,7 @@ jobs: check_test_data: runs-on: ubuntu-latest - name: Check test model + name: Check test data steps: - name: Checkout repository @@ -55,15 +55,17 @@ jobs: distribution: temurin java-version: 11 - # Clone the cromwell repo to this VM. - # This is the same step as used by broadinstitute/cromwell/.github/set_up_cromwell_action, - # but without a token and into a different directory. - - name: Clone Cromwell - uses: actions/checkout@v3 + # Get cromwell jar file + - uses: robinraju/release-downloader@v1.10 with: - repository: broadinstitute/cromwell - ref: "87" - path: "cromwell" + repository: 'broadinstitute/cromwell' + tag: '87' + fileName: 'cromwell-87.jar' + + - name: Validate test data + run: | + java -jar cromwell-87.jar --help + shell: bash - name: Success! run: echo "Success!" From cfc5c8294009d7c0b95f297f26e8b36b52506b2e Mon Sep 17 00:00:00 2001 From: Adrienne Stilp Date: Tue, 21 May 2024 16:50:23 -0700 Subject: [PATCH 7/7] Try running the validate_phenotype_model WDL in CI Also add a file that can be used for input to this workflow. --- .github/workflows/ci.yml | 8 +++++++- test_data/wdl_inputs_validate_phenotype_model.json | 11 +++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 test_data/wdl_inputs_validate_phenotype_model.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 90d5cc9..ce76452 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,6 +47,12 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 + - name: Checkout primed-file-checks + uses: actions/checkout@v3 + with: + repository: UW-GAC/primed-file-checks + path: primed-file-checks + # Install Java to this VM. This Java version and distribution is compatible with Cromwell. # This is the same step as used by broadinstitute/cromwell/.github/set_up_cromwell_action. - name: Setup JDK @@ -64,7 +70,7 @@ jobs: - name: Validate test data run: | - java -jar cromwell-87.jar --help + java -jar cromwell-87.jar run primed-file-checks/validate_phenotype_model.wdl --inputs test_data/wdl_inputs_validate_phenotype_model.json shell: bash - name: Success! diff --git a/test_data/wdl_inputs_validate_phenotype_model.json b/test_data/wdl_inputs_validate_phenotype_model.json new file mode 100644 index 0000000..13653d5 --- /dev/null +++ b/test_data/wdl_inputs_validate_phenotype_model.json @@ -0,0 +1,11 @@ +{ + "validate_phenotype_model.table_files": { + "subject": "test_data/subject.tsv", + "phenotype_harmonized": "test_data/phenotype_harmonized.tsv" + }, + "validate_phenotype_model.model_url": "https://raw.githubusercontent.com/UW-GAC/primed-file-checks/main/testdata/data_model_phen.json", + "validate_phenotype_model.import_tables": false, + "validate_phenotype_model.overwrite": true, + "validate_phenotype_model.workspace_name": "PRIMED_pheno_QC_test", + "validate_phenotype_model.workspace_namespace": "primed-cc-scratch" +}