-
Notifications
You must be signed in to change notification settings - Fork 92
Closed
Labels
Description
Problem
The payment-detection tests rely on the EXPLORER_API_KEY_* secrets. Secrets are not available to PRs from external forks.
Example
Solution
Skip tests that rely on secrets in PRs from external forks.
Details
The particular variable of interest to us is
CIRCLE_PR_NUMBER, documented as “the number of the associated GitHub or Bitbucket pull request. Only available on forked PRs.” IfCIRCLE_PR_NUMBERexists, then we know we are running a build for a forked PR that does not have access to secrets.To express this condition in shell syntax, we use the -n (non-zero length) test. The condition will look like this:
if [ -n "$CIRCLE_PR_NUMBER" ]; then
# mark this job successful and stop processing
fi
Reference
Reactions are currently unavailable