Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit 616ca4a

Browse files
authored
chore: Log a message when tests run on forked repo (#5513)
1 parent 63f357d commit 616ca4a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/test.yml

+8
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ jobs:
4545
- run: npm install
4646
- name: Run unit tests
4747
run: |
48+
# Unit tests does not run on forked repositories because GitHub
49+
# secrets (that includes Sauce access info) are not shared.
50+
# TODO: Figure out a way to Set a warning or set status message
51+
52+
if [[ -z "$SAUCE_USERNAME$SAUCE_ACCESS_KEY" ]]; then
53+
echo "Unit tests do not run on forked repos because of Sauce labs access"
54+
exit 0
55+
fi
4856
export SAUCE_BUILD_ID=mdc-tests-${GITHUB_EVENT_NAME}-${GITHUB_ACTION}-${GITHUB_SHA}
4957
export SAUCE_TUNNEL_ID=${SAUCE_BUILD_ID}-tunnel
5058
npm run test:unit

0 commit comments

Comments
 (0)