Adding cache test WDL and GitHub Action #86
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
name: WOMtool Validation of WDL Script | |
on: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
generate-matrix: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Find WDL Directories | |
id: set-matrix | |
run: | | |
# Find all directories containing .wdl files | |
dirs=$(find . -type f -name "*.wdl" -exec dirname {} \; | sort -u | sed 's|^\./||' | jq -R . | jq -s | jq -c .) | |
echo "Directories: $dirs" | |
echo "matrix=$dirs" >> $GITHUB_OUTPUT | |
womtoolval: | |
needs: generate-matrix | |
if: ${{ github.event.pull_request.head.repo.fork == false }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
wdl: ${{ fromJson(needs.generate-matrix.outputs.matrix) }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set Up Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
- name: Pull WOMtool Jarfile | |
run: wget -q https://github.com/broadinstitute/cromwell/releases/download/86/womtool-86.jar | |
- name: Install uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
version: "0.5.16" | |
- name: Set up Python | |
run: uv python install 3.13 | |
- name: Install dependencies | |
run: uv sync --all-extras | |
- name: Validate WDL Scripts | |
env: | |
WOMTOOL_PATH: womtool-86.jar | |
run: uv run pytest tests/cromwelljava/test-validate.py --wdl-path=${{ matrix.wdl }} --verbose -s |