Skip to content

Commit

Permalink
Output to test_results folder (it is finally working)
Browse files Browse the repository at this point in the history
  • Loading branch information
jslane-h committed Dec 4, 2024
1 parent ab27c8a commit b9cd8bb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -35,4 +32,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: test_results
path: ${{ github.workspace }}
path: ${{ github.workspace }}/test_results
6 changes: 4 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit b9cd8bb

Please sign in to comment.