Skip to content

Commit

Permalink
Merge pull request #1 from hubmapconsortium/mccalluc/trivial-example
Browse files Browse the repository at this point in the history
Mccalluc/trivial example
  • Loading branch information
pdblood authored Jan 9, 2020
2 parents 0eb8ebe + 2f0c500 commit 0ea58a9
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
airflow.cfg
**/test-output-actual

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
language: python
python:
- '3.7'
cache: pip
script:
- ./test.sh
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cwlref-runner==1.0
cwltool==1.0.20191206125148
20 changes: 20 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -o errexit

start() { echo travis_fold':'start:$1; echo $1; }
end() { echo travis_fold':'end:$1; }
die() { set +v; echo "$*" 1>&2 ; sleep 1; exit 1; }

CWL_NAME=workflow.cwl
OUTPUT_NAME=test-output-actual
for CWL_PATH in workflows/cwl/*/workflow.cwl; do
cd `dirname $CWL_PATH`
LABEL=`basename $PWD`
start $LABEL
mkdir $OUTPUT_NAME || echo 'Output directory already exists...'
cd $OUTPUT_NAME
../$CWL_NAME ../test-job.yml
cd ..
diff -w -r test-output-expected $OUTPUT_NAME -x .DS_Store | head -n100 | cut -c 1-100
end $LABEL
done
Empty file.
Empty file.
3 changes: 3 additions & 0 deletions workflows/cwl/simple-cli-example/test-job.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
input_directory:
class: Directory
path: test-input
2 changes: 2 additions & 0 deletions workflows/cwl/simple-cli-example/test-output-expected/ls.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
a.txt
z.txt
15 changes: 15 additions & 0 deletions workflows/cwl/simple-cli-example/workflow.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env cwl-runner

cwlVersion: v1.0
class: CommandLineTool
baseCommand: ls
inputs:
input_directory:
type: Directory
inputBinding:
position: 1
stdout:
ls.txt
outputs:
output_file:
type: stdout

0 comments on commit 0ea58a9

Please sign in to comment.