diff --git a/Dockerfile b/Dockerfile index 8dd83fa..f2a56b1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,9 +20,4 @@ WORKDIR /app COPY . /app # Find directories containing measure.py and run tests' -RUN echo $GITHUB_WORKSPACE -RUN openstudio measure -t ./lib/measures >> $GITHUB_WORKSPACE/measure_check_output.txt -RUN bash -c "\ - for dir in \$(find . -type f -name 'measure.py' -exec dirname {} \; | sort -u); do \ - pytest \$dir >> $GITHUB_WORKSPACE/pytest_output.txt; \ - done" \ No newline at end of file +ENTRYPOINT ["entrypoint.sh"] \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100755 index 0000000..cc0cd72 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,9 @@ +#!/bin/sh -l + +echo $GITHUB_WORKSPACE + +openstudio measure -t ./lib/measures >> $GITHUB_WORKSPACE/measure_check_output.txt + +for dir in \$(find . -type f -name 'measure.py' -exec dirname {} \; | sort -u); do \ + pytest \$dir >> $GITHUB_WORKSPACE/pytest_output.txt; \ +done \ No newline at end of file