Skip to content

Commit

Permalink
Merge pull request #58 from esl-epfl/ci/pr-check-output
Browse files Browse the repository at this point in the history
ci(pr-check): add tsv output verification
  • Loading branch information
danjjl authored Dec 10, 2024
2 parents 817bc2d + 358feaa commit d307e7d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/1-pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,18 @@ jobs:
exit 1
fi
done
- name: Check output
run: |
HEADER_REGEX='onset duration eventType confidence channels dateTime recordingDuration'
for algo in ${FILELIST}; do
IMAGE=$(grep '^image: ' $algo | sed 's/^image: \+//' | tr -d \'\")
OUT=$(tr -cd '[:alnum:]' < <(echo $IMAGE) )
echo "running: $IMAGE"
docker run -v ./tests/data:/data -v /tmp:/output -e INPUT=unipolar.edf -e OUTPUT="${OUT}.tsv" $IMAGE
if ! [[ $(head -n1 "/tmp/${OUT}.tsv") =~ "$HEADER_REGEX" ]]; then
echo "Output does not have the expected header"
exit 1
fi
done
Binary file added tests/data/bipolar.edf
Binary file not shown.
Binary file added tests/data/unipolar.edf
Binary file not shown.

0 comments on commit d307e7d

Please sign in to comment.