diff --git a/.github/workflows/1-pr-check.yml b/.github/workflows/1-pr-check.yml index a968e02..be46b04 100644 --- a/.github/workflows/1-pr-check.yml +++ b/.github/workflows/1-pr-check.yml @@ -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 diff --git a/tests/data/bipolar.edf b/tests/data/bipolar.edf new file mode 100644 index 0000000..40a8673 Binary files /dev/null and b/tests/data/bipolar.edf differ diff --git a/tests/data/unipolar.edf b/tests/data/unipolar.edf new file mode 100644 index 0000000..3972ce0 Binary files /dev/null and b/tests/data/unipolar.edf differ