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

Mccalluc/trivial example #1

Merged
merged 4 commits into from
Jan 9, 2020
Merged
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
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