Skip to content

Commit 82728be

Browse files
committed
Use bazel info bazel-testlogs to find the test logs
1 parent e0ececc commit 82728be

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

.github/workflows/test.yaml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,11 @@ jobs:
124124
working-directory: test
125125
shell: bash
126126
run: |
127-
LOGS_TAR=$PWD/logs.tar
128-
cd bazel-testlogs
129-
tar -cf $LOGS_TAR *
127+
TESTLOGS_DIR="$(bazel info bazel-testlogs)"
128+
if [[ -d $TESTLOGS_DIR ]]; then
129+
cd $TESTLOGS_DIR
130+
tar -cf $LOGS_TAR *
131+
fi
130132
- name: CAPTURE TEST LOGS
131133
if: always()
132134
uses: actions/upload-artifact@v3
@@ -200,9 +202,11 @@ jobs:
200202
working-directory: test
201203
shell: bash
202204
run: |
203-
LOGS_TAR=$PWD/logs.tar
204-
cd bazel-testlogs
205-
tar -cf $LOGS_TAR *
205+
TESTLOGS_DIR="$(bazel info bazel-testlogs)"
206+
if [[ -d $TESTLOGS_DIR ]]; then
207+
cd $TESTLOGS_DIR
208+
tar -cf $LOGS_TAR *
209+
fi
206210
- name: CAPTURE TEST LOGS
207211
if: always()
208212
uses: actions/upload-artifact@v3

0 commit comments

Comments
 (0)