Skip to content

Commit 8aab84a

Browse files
committed
Use bazel info bazel-testlogs to find the test logs
1 parent 580cca9 commit 8aab84a

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
@@ -82,9 +82,11 @@ jobs:
8282
working-directory: test
8383
shell: bash
8484
run: |
85-
LOGS_TAR=$PWD/logs.tar
86-
cd bazel-testlogs
87-
tar -cf $LOGS_TAR *
85+
TESTLOGS_DIR="$(bazel info bazel-testlogs)"
86+
if [[ -d $TESTLOGS_DIR ]]; then
87+
cd $TESTLOGS_DIR
88+
tar -cf $LOGS_TAR *
89+
fi
8890
- name: CAPTURE TEST LOGS
8991
if: always()
9092
uses: actions/upload-artifact@v3
@@ -157,9 +159,11 @@ jobs:
157159
working-directory: test
158160
shell: bash
159161
run: |
160-
LOGS_TAR=$PWD/logs.tar
161-
cd bazel-testlogs
162-
tar -cf $LOGS_TAR *
162+
TESTLOGS_DIR="$(bazel info bazel-testlogs)"
163+
if [[ -d $TESTLOGS_DIR ]]; then
164+
cd $TESTLOGS_DIR
165+
tar -cf $LOGS_TAR *
166+
fi
163167
- name: CAPTURE TEST LOGS
164168
if: always()
165169
uses: actions/upload-artifact@v3

0 commit comments

Comments
 (0)