Validate test data in CI job #55
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
pull_request: | |
branches: [ "master", "main" ] | |
push: | |
branches: [ "master", "main" ] | |
jobs: | |
check_data_models: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
data_model_file: [ | |
'PRIMED_phenotype_data_model.json', | |
'PRIMED_genotype_data_model.json', | |
'PRIMED_GSR_data_model.json' | |
] | |
name: Check data model | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup R | |
uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: "4.2.3" | |
- name: Install dependencies | |
uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
cache-version: 1 | |
packages: github::UW-GAC/AnvilDataModels, any::sessioninfo | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check ${{ matrix.data_model_file }} file | |
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 | |
# 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: | |
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 | |
with: | |
repository: broadinstitute/cromwell | |
ref: "87" | |
path: "cromwell" | |
- name: Success! | |
run: echo "Success!" |