@@ -87,15 +87,15 @@ aliases:
8787 cat ${HOME}/project/.circleci/scripts/enable-vnc.sh >> ~/.bashrc
8888 fi
8989
90- # Check if MMI Optional tests should run
91- - &check-mmi-optional
92- name : Check if MMI Optional tests should run
90+ # Check if MMI tests should run
91+ - &check-mmi-trigger
92+ name : Check if MMI tests should run
9393 command : |
94- RUN_MMI_OPTIONAL=$(cat ./RUN_MMI_OPTIONAL)
95- if [[ "${RUN_MMI_OPTIONAL }" == "true" ] ]; then
96- echo "Running MMI Optional tests"
94+ source mmi_trigger.env
95+ if [ "${run_mmi_tests }" == "true" ]; then
96+ echo "Running MMI tests"
9797 else
98- echo "Skipping MMI Optional tests"
98+ echo "Skipping MMI tests"
9999 circleci step halt
100100 fi
101101
@@ -114,7 +114,7 @@ workflows:
114114 - trigger-beta-build :
115115 requires :
116116 - prep-deps
117- - check-pr-tag
117+ - check-mmi-trigger
118118 - prep-deps
119119 - get-changed-files-with-git-diff :
120120 filters :
@@ -179,7 +179,7 @@ workflows:
179179 - prep-build-test-mmi-playwright :
180180 requires :
181181 - prep-deps
182- - check-pr-tag
182+ - check-mmi-trigger
183183 - prep-build-storybook :
184184 requires :
185185 - prep-deps
@@ -231,7 +231,7 @@ workflows:
231231 requires :
232232 - prep-build-test-mmi
233233 - get-changed-files-with-git-diff
234- - test-e2e-mmi-playwright - OPTIONAL :
234+ - test-e2e-mmi-playwright :
235235 requires :
236236 - prep-build-test-mmi-playwright
237237 - test-e2e-chrome-rpc-mmi :
@@ -421,39 +421,6 @@ jobs:
421421 name : Create GitHub Pull Request for version
422422 command : .circleci/scripts/release-create-release-pr.sh
423423
424- check-pr-tag :
425- docker :
426- - image : cimg/base:stable
427- steps :
428- - run :
429- name : Check for MMI Team Tag
430- command : |
431- #!/bin/bash
432-
433- GH_LABEL=team-mmi
434- if [ -z "$CIRCLE_PULL_REQUESTS" ]; then
435- echo "Skipping tag check; this is not a PR."
436- echo "false" > ./RUN_MMI_OPTIONAL
437- exit 0
438- fi
439-
440- echo $CIRCLE_PULL_REQUESTS | sed 's/,/\n/g'
441-
442- # See if any associated PRs have matching label
443- HAS_MATCHING_PR=$(echo $CIRCLE_PULL_REQUESTS \
444- | sed -e 's#,#\n#g' -e 's#/github.com/#/api.github.com/repos/#g' -e 's#/pull/#/pulls/#g' \
445- | xargs -n1 curl -s \
446- | jq -s "map((.labels|map(select(.name==\"${GH_LABEL}\"))))|flatten|length > 0")
447-
448- echo "${GH_LABEL} tag presence: ${HAS_MATCHING_PR}"
449-
450- # assign the RUN_MMI_OPTIONAL variable
451- echo "${HAS_MATCHING_PR}" > ./RUN_MMI_OPTIONAL
452- - persist_to_workspace :
453- root : .
454- paths :
455- - RUN_MMI_OPTIONAL
456-
457424 prep-deps :
458425 executor : node-browsers-medium
459426 steps :
@@ -839,7 +806,7 @@ jobs:
839806 - run : corepack enable
840807 - attach_workspace :
841808 at : .
842- - run : *check-mmi-optional
809+ - run : *check-mmi-trigger
843810 - run :
844811 name : Build MMI extension for Playwright e2e
845812 command : |
@@ -854,7 +821,6 @@ jobs:
854821 - persist_to_workspace :
855822 root : .
856823 paths :
857- - RUN_MMI_OPTIONAL
858824 - dist-test-mmi-playwright
859825 - builds-test-mmi-playwright
860826 - store_artifacts :
@@ -1306,15 +1272,15 @@ jobs:
13061272 - store_test_results :
13071273 path : test/test-results/e2e
13081274
1309- test-e2e-mmi-playwright - OPTIONAL :
1275+ test-e2e-mmi-playwright :
13101276 executor : playwright
13111277 parallelism : 2
13121278 steps :
13131279 - run : *shallow-git-clone-and-enable-vnc
13141280 - run : corepack enable
13151281 - attach_workspace :
13161282 at : .
1317- - run : *check-mmi-optional
1283+ - run : *check-mmi-trigger
13181284 - run :
13191285 name : Move test build to dist
13201286 command : mv ./dist-test-mmi-playwright ./dist
@@ -1743,3 +1709,18 @@ jobs:
17431709 - run :
17441710 name : All Tests Passed
17451711 command : echo 'whew - everything passed!'
1712+
1713+ check-mmi-trigger :
1714+ executor : node-browsers-medium
1715+ steps :
1716+ - checkout
1717+ - run :
1718+ name : Check for MMI Team Label or Reviewer
1719+ command : ./.circleci/scripts/check_mmi_trigger.sh
1720+ - store_artifacts :
1721+ path : mmi_trigger.env
1722+ destination : mmi_trigger.env
1723+ - persist_to_workspace :
1724+ root : .
1725+ paths :
1726+ - mmi_trigger.env
0 commit comments