Skip to content

Commit 22a886e

Browse files
committed
Use bazel info bazel-testlogs to find the test logs
1 parent afa1711 commit 22a886e

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
@@ -83,9 +83,11 @@ jobs:
8383
working-directory: test
8484
shell: bash
8585
run: |
86-
LOGS_TAR=$PWD/logs.tar
87-
cd bazel-testlogs
88-
tar -cf $LOGS_TAR *
86+
TESTLOGS_DIR="$(bazel info bazel-testlogs)"
87+
if [[ -d $TESTLOGS_DIR ]]; then
88+
cd $TESTLOGS_DIR
89+
tar -cf $LOGS_TAR *
90+
fi
8991
- name: CAPTURE TEST LOGS
9092
if: always()
9193
uses: actions/upload-artifact@v3
@@ -159,9 +161,11 @@ jobs:
159161
working-directory: test
160162
shell: bash
161163
run: |
162-
LOGS_TAR=$PWD/logs.tar
163-
cd bazel-testlogs
164-
tar -cf $LOGS_TAR *
164+
TESTLOGS_DIR="$(bazel info bazel-testlogs)"
165+
if [[ -d $TESTLOGS_DIR ]]; then
166+
cd $TESTLOGS_DIR
167+
tar -cf $LOGS_TAR *
168+
fi
165169
- name: CAPTURE TEST LOGS
166170
if: always()
167171
uses: actions/upload-artifact@v3

0 commit comments

Comments
 (0)