Skip to content

Commit

Permalink
fix: Improve MMI test trigger handling in CI
Browse files Browse the repository at this point in the history
- Update check_mmi_trigger.sh to skip tests for forks without failing
- Remove redundant chmod from CircleCI config
  • Loading branch information
albertolive committed Oct 22, 2024
1 parent faf540d commit 8844e35
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 1 addition & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1716,9 +1716,7 @@ jobs:
- checkout
- run:
name: Check for MMI Team Label or Reviewer
command: |
chmod +x .circleci/scripts/check_mmi_trigger.sh
./.circleci/scripts/check_mmi_trigger.sh "team-mmi" "mmi"
command: ./.circleci/scripts/check_mmi_trigger.sh
- store_artifacts:
path: mmi_trigger.env
destination: mmi_trigger.env
Expand Down
6 changes: 4 additions & 2 deletions .circleci/scripts/check_mmi_trigger.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ set -eo pipefail

# Ensure required environment variables are set
if [ -z "$CIRCLE_PULL_REQUEST" ] || [ -z "$GITHUB_TOKEN" ]; then
echo "Error: CIRCLE_PULL_REQUEST and GITHUB_TOKEN must be set."
exit 1
echo "This appears to be a fork or required environment variables are not set."
echo "Skipping MMI tests."
echo "run_mmi_tests=false" > mmi_trigger.env
exit 0
fi

# Extract PR number from the pull request URL
Expand Down

0 comments on commit 8844e35

Please sign in to comment.