Skip to content

Commit d4054a9

Browse files
committed
check for tests
1 parent 3d1d960 commit d4054a9

File tree

1 file changed

+35
-2
lines changed

1 file changed

+35
-2
lines changed

.circleci/config.yml

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,32 @@ jobs:
749749
- run: node dist/libs/remix-tests/bin/remix-tests ./libs/remix-tests/tests/examples_0/assert_ok_test.sol
750750
- run: yarn run test:libs
751751

752+
753+
check-flaky-or-pr-tests:
754+
docker:
755+
- image: cimg/node:20.0.0-browsers
756+
working_directory: ~/remix-project
757+
parameters:
758+
tag:
759+
type: string
760+
steps:
761+
- checkout
762+
- restore_cache:
763+
keys:
764+
- v1-deps-{{ checksum "yarn.lock" }}
765+
- run: yarn
766+
- run: yarn run build:e2e
767+
- run:
768+
name: Check for enabled tests matching tag
769+
command: |
770+
echo "🔍 Searching for enabled tests with .$<< parameters.tag >> extension..."
771+
if grep -IRiL "'@disabled': \?true" "dist/apps/remix-ide-e2e/src/tests" | grep "\.${<< parameters.tag >>}"; then
772+
echo "✅ Found enabled .$<< parameters.tag >> tests."
773+
exit 0
774+
else
775+
echo "⚠️ No enabled .$<< parameters.tag >> tests found. Skipping workflow."
776+
exit 1
777+
752778
remix-ide-browser:
753779
docker:
754780
- image: cimg/node:20.18.3-browsers
@@ -978,7 +1004,11 @@ workflows:
9781004
run_pr_tests:
9791005
when: << pipeline.parameters.run_pr_tests >>
9801006
jobs:
981-
- build
1007+
- check-flaky-or-pr-tests:
1008+
tag: "pr"
1009+
- build:
1010+
requires:
1011+
- check-flaky-or-pr-tests
9821012
- remix-ide-browser:
9831013
requires:
9841014
- build
@@ -994,7 +1024,10 @@ workflows:
9941024
run_flaky_tests:
9951025
when: << pipeline.parameters.run_flaky_tests >>
9961026
jobs:
997-
- build
1027+
- check-flaky-or-pr-tests
1028+
- build:
1029+
requires:
1030+
- check-flaky-or-pr-tests
9981031
- remix-ide-browser:
9991032
requires:
10001033
- build

0 commit comments

Comments
 (0)