Skip to content

Commit

Permalink
ci(pr-check): different output file for each algo
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdoret authored and danjjl committed Dec 10, 2024
1 parent 8b6d4c3 commit 6c0f836
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/1-pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,16 @@ jobs:
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=bipolar.edf -e OUTPUT=out.tsv $IMAGE
HEADER_REGEX='onset duration eventType confidence channels dateTime recordingDuration'
head -n1 /tmp/out.tsv
if ! [[ $(head -n1 /tmp/out.tsv) =~ "$HEADER_REGEX" ]]; then
docker run -v ./tests/data:/data -v /tmp:/output -e INPUT=bipolar.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
rm -f /tmp/out.tsv
done

0 comments on commit 6c0f836

Please sign in to comment.