From b9cd8bbd82817fdd79bedea20e9bcabb6f37f624 Mon Sep 17 00:00:00 2001 From: Julian Slane Date: Wed, 4 Dec 2024 12:18:01 -0800 Subject: [PATCH] Output to test_results folder (it is finally working) --- .github/workflows/unit_tests.yml | 9 +++------ entrypoint.sh | 6 ++++-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index d0c15f6..f71f70a 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -21,11 +21,8 @@ jobs: - name: Check for FAILURE in pytest_output.txt run: | - pwd - ls -la $GITHUB_WORKSPACE - ls -la ${{ github.workspace }} - echo $GITHUB_WORKSPACE - echo ${{ github.workspace }} + cat test_results/pytest_output.txt + cat test_results/measure_check_output.txt # cat test_results/pytest_output.txt # if grep -q 'FAILURE' test_results/pytest_output.txt; then # exit 1 @@ -35,4 +32,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: test_results - path: ${{ github.workspace }} \ No newline at end of file + path: ${{ github.workspace }}/test_results \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh index 6d105ec..1f36f9a 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -2,8 +2,10 @@ echo $GITHUB_WORKSPACE -openstudio measure -t ./lib/measures >> $GITHUB_WORKSPACE/measure_check_output.txt +mkdir $GITHUB_WORKSPACE/test_results + +openstudio measure -t ./lib/measures >> $GITHUB_WORKSPACE/test_results/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" + pytest "$dir" >> "$GITHUB_WORKSPACE/test_results/pytest_output.txt" done \ No newline at end of file