metamask config

partest
bunsenstraat 3 weeks ago
parent 999141c9b1
commit d71bf8b481
  1. 17
      .circleci/config.yml
  2. 2
      apps/remix-ide/ci/browser_test.sh
  3. 33
      apps/remix-ide/ci/metamask.sh

@ -640,7 +640,7 @@ jobs:
type: string type: string
jobsize: jobsize:
type: string type: string
parallelism: 15 parallelism: << parameters.parallelism >>
steps: steps:
- checkout - checkout
- attach_workspace: - attach_workspace:
@ -781,6 +781,20 @@ workflows:
script: ["flaky.sh"] script: ["flaky.sh"]
job: ["nogroup"] job: ["nogroup"]
jobsize: ["1"] jobsize: ["1"]
parallelism: 10
run_flaky_tests:
jobs:
- build
- remix-ide-browser:
requires:
- build
matrix:
parameters:
browser: ["chrome"]
script: ["metamask.sh"]
job: ["nogroup"]
jobsize: ["1"]
parallelism: 1
build_all: build_all:
unless: << pipeline.parameters.run_flaky_tests >> unless: << pipeline.parameters.run_flaky_tests >>
jobs: jobs:
@ -867,6 +881,7 @@ workflows:
script: ["browser_test.sh"] script: ["browser_test.sh"]
job: ["0","1","2","3","4","5","6","7","8","9"] job: ["0","1","2","3","4","5","6","7","8","9"]
jobsize: ["10"] jobsize: ["10"]
parallelism: 15
- tests-passed: - tests-passed:
requires: requires:
- lint - lint

@ -15,7 +15,7 @@ sleep 5
# grep -IRiL "@disabled" "dist/apps/remix-ide-e2e/src/tests" | grep "\.spec\|\.test" | xargs -I {} basename {} .test.js | grep -E "\b[${2}]" # grep -IRiL "@disabled" "dist/apps/remix-ide-e2e/src/tests" | grep "\.spec\|\.test" | xargs -I {} basename {} .test.js | grep -E "\b[${2}]"
# TESTFILES=$(grep -IRiL "@disabled" "dist/apps/remix-ide-e2e/src/tests" | grep "\.spec\|\.test" | xargs -I {} basename {} .test.js | grep -E "\b[$2]" | circleci tests split --split-by=timings ) # TESTFILES=$(grep -IRiL "@disabled" "dist/apps/remix-ide-e2e/src/tests" | grep "\.spec\|\.test" | xargs -I {} basename {} .test.js | grep -E "\b[$2]" | circleci tests split --split-by=timings )
node apps/remix-ide/ci/splice_tests.js $2 $3 node apps/remix-ide/ci/splice_tests.js $2 $3
TESTFILES=$(node apps/remix-ide/ci/splice_tests.js $2 $3 | circleci tests split --split-by=timings) TESTFILES=$(node apps/remix-ide/ci/splice_tests.js $2 $3 | grep -v 'metamask' | circleci tests split --split-by=timings)
for TESTFILE in $TESTFILES; do for TESTFILE in $TESTFILES; do
npx nightwatch --config dist/apps/remix-ide-e2e/nightwatch-${1}.js dist/apps/remix-ide-e2e/src/tests/${TESTFILE}.js --env=$1 || npx nightwatch --config dist/apps/remix-ide-e2e/nightwatch-${1}.js dist/apps/remix-ide-e2e/src/tests/${TESTFILE}.js --env=$1 || TEST_EXITCODE=1 npx nightwatch --config dist/apps/remix-ide-e2e/nightwatch-${1}.js dist/apps/remix-ide-e2e/src/tests/${TESTFILE}.js --env=$1 || npx nightwatch --config dist/apps/remix-ide-e2e/nightwatch-${1}.js dist/apps/remix-ide-e2e/src/tests/${TESTFILE}.js --env=$1 || TEST_EXITCODE=1
done done

@ -0,0 +1,33 @@
#!/usr/bin/env bash
set -e
TESTFILES=$(grep -IRiL "\'@disabled\': \?true" "dist/apps/remix-ide-e2e/src/tests" | grep "metamask" | sort )
# count test files
fileCount=$(grep -IRiL "\'@disabled\': \?true" "dist/apps/remix-ide-e2e/src/tests" | grep "metamask" | wc -l )
# if fileCount is 0
if [ $fileCount -eq 0 ]
then
echo "No metamask tests found"
exit 0
fi
BUILD_ID=${CIRCLE_BUILD_NUM:-${TRAVIS_JOB_NUMBER}}
echo "$BUILD_ID"
TEST_EXITCODE=0
npx ganache &
npx http-server -p 9090 --cors='*' ./node_modules &
yarn run serve:production &
sleep 5
for TESTFILE in $TESTFILES; do
npx nightwatch --config dist/apps/remix-ide-e2e/nightwatch-${1}.js $TESTFILE --env=$1 || TEST_EXITCODE=1
done
echo "$TEST_EXITCODE"
if [ "$TEST_EXITCODE" -eq 1 ]
then
exit 1
fi
Loading…
Cancel
Save