Split ci builds

pull/1041/head
ioedeveloper 4 years ago
parent 90f5ecf5f8
commit 59223e79bd
  1. 152
      .circleci/config.yml
  2. 0
      apps/remix-ide-e2e/src/tests/ballot_0_4_11.spec.ts
  3. 0
      apps/remix-ide/ci/browser_tests_chrome_1.sh
  4. 27
      apps/remix-ide/ci/browser_tests_chrome_2.sh
  5. 0
      apps/remix-ide/ci/browser_tests_firefox_1.sh
  6. 27
      apps/remix-ide/ci/browser_tests_firefox_2.sh
  7. 2
      package.json

@ -4,7 +4,7 @@
#
version: 2
jobs:
remix-libs:
lint:
docker:
# specify the version you desire here
- image: circleci/node:10.18.0-browsers
@ -23,10 +23,31 @@ jobs:
- checkout
- run: npm install
- run: npm run lint:libs
- run: npm run lint
- run: npm run lint remix-ide-e2e
remix-libs:
docker:
# specify the version you desire here
- image: circleci/node:10.18.0-browsers
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
resource_class: xlarge
# - image: circleci/mongo:3.4.4
environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
- COMMIT_AUTHOR: "Circle CI"
working_directory: ~/remix-project
steps:
- checkout
- run: npm install
- run: npm run build:libs
- run: npm run test:libs
remix-ide-chrome:
remix-ide-chrome-1:
docker:
# specify the version you desire here
- image: circleci/node:10.18.0-browsers
@ -39,15 +60,12 @@ jobs:
environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
- COMMIT_AUTHOR: "Circle CI"
- FILES_TO_PACKAGE: "dist/apps/remix-ide/assets dist/apps/remix-ide/index.html dist/apps/remix-ide/main.js dist/apps/remix-ide/polyfills.js dist/apps/remix-ide/runtime.js dist/apps/remix-ide/vendor.js dist/apps/remix-ide/favicon.ico"
working_directory: ~/remix-project
parallelism: 20
steps:
- checkout
- run: npm install
- run: npm run lint
- run: npm run lint remix-ide-e2e
- run: npm run build:libs
- run: npm run build
- run:
@ -57,13 +75,47 @@ jobs:
name: Start Selenium
command: ./node_modules/.bin/selenium-standalone start --drivers.chrome.version=2.39 --drivers.chrome.baseURL=https://chromedriver.storage.googleapis.com
background: true
- run: ./apps/remix-ide/ci/browser_tests_chrome.sh
- run: ./apps/remix-ide/ci/browser_tests_chrome_1.sh
- store_test_results:
path: ./reports/tests
- store_artifacts:
path: ./reports/screenshots
remix-ide-firefox:
remix-ide-chrome-2:
docker:
# specify the version you desire here
- image: circleci/node:10.18.0-browsers
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
resource_class: xlarge
# - image: circleci/mongo:3.4.4
environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
- COMMIT_AUTHOR: "Circle CI"
working_directory: ~/remix-project
parallelism: 20
steps:
- checkout
- run: npm install
- run: npm run build:libs
- run: npm run build
- run:
name: Download Selenium
command: ./node_modules/.bin/selenium-standalone install --drivers.chrome.version=2.39 --drivers.chrome.baseURL=https://chromedriver.storage.googleapis.com
- run:
name: Start Selenium
command: ./node_modules/.bin/selenium-standalone start --drivers.chrome.version=2.39 --drivers.chrome.baseURL=https://chromedriver.storage.googleapis.com
background: true
- run: ./apps/remix-ide/ci/browser_tests_chrome_2.sh
- store_test_results:
path: ./reports/tests
- store_artifacts:
path: ./reports/screenshots
remix-ide-firefox-1:
docker:
# specify the version you desire here
- image: circleci/node:10.18.0-browsers
@ -76,15 +128,12 @@ jobs:
environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
- COMMIT_AUTHOR: "Circle CI"
- FILES_TO_PACKAGE: "dist/apps/remix-ide/assets dist/apps/remix-ide/index.html dist/apps/remix-ide/main.js dist/apps/remix-ide/polyfills.js dist/apps/remix-ide/runtime.js dist/apps/remix-ide/vendor.js dist/apps/remix-ide/favicon.ico"
working_directory: ~/remix-project
parallelism: 20
steps:
- checkout
- run: npm install
- run: npm run lint
- run: npm run lint remix-ide-e2e
- run: npm run build:libs
- run: npm run build
- run:
@ -100,7 +149,47 @@ jobs:
- run:
name: Install Firefox
command: sudo dpkg -i firefox-mozilla-build_73.0.1-0ubuntu1_amd64.deb
- run: ./apps/remix-ide/ci/browser_tests_firefox.sh
- run: ./apps/remix-ide/ci/browser_tests_firefox_1.sh
- store_test_results:
path: ./reports/tests
- store_artifacts:
path: ./reports/screenshots
remix-ide-firefox-2:
docker:
# specify the version you desire here
- image: circleci/node:10.18.0-browsers
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
resource_class: xlarge
# - image: circleci/mongo:3.4.4
environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
- COMMIT_AUTHOR: "Circle CI"
working_directory: ~/remix-project
parallelism: 20
steps:
- checkout
- run: npm install
- run: npm run build:libs
- run: npm run build
- run:
name: Download Selenium
command: ./node_modules/.bin/selenium-standalone install --config=../remix-project/apps/remix-ide-e2e/seleniumConfig.js
- run:
name: Start Selenium
command: ./node_modules/.bin/selenium-standalone start --config=../remix-project/apps/remix-ide-e2e/seleniumConfig.js
background: true
- run:
name: Download Latest Firefox
command: sudo apt-get purge -y firefox && wget https://sourceforge.net/projects/ubuntuzilla/files/mozilla/apt/pool/main/f/firefox-mozilla-build/firefox-mozilla-build_73.0.1-0ubuntu1_amd64.deb
- run:
name: Install Firefox
command: sudo dpkg -i firefox-mozilla-build_73.0.1-0ubuntu1_amd64.deb
- run: ./apps/remix-ide/ci/browser_tests_firefox_2.sh
- store_test_results:
path: ./reports/tests
- store_artifacts:
@ -125,8 +214,6 @@ jobs:
steps:
- checkout
- run: npm install
- run: npm run lint
- run: npm run lint remix-ide-e2e
- run: npm run build:libs
- run: npm run build
- run:
@ -162,7 +249,6 @@ jobs:
steps:
- checkout
- run: npm install
- run: npm run lint
- run: npm run build:libs
- run: npm run build
- run:
@ -246,7 +332,6 @@ jobs:
steps:
- checkout
- run: npm install
- run: npm run lint
- run: npm run build:libs
- run: npm run build
- run:
@ -260,11 +345,20 @@ workflows:
version: 2
build_all:
jobs:
- lint
- remix-libs
- remix-ide-chrome:
requires:
- lint
- remix-ide-chrome-1:
requires:
- remix-libs
- remix-ide-chrome-2:
requires:
- remix-libs
- remix-ide-firefox-1:
requires:
- remix-libs
- remix-ide-firefox:
- remix-ide-firefox-2:
requires:
- remix-libs
- remix-ide-run-deploy:
@ -272,29 +366,37 @@ workflows:
- remix-libs
- publish:
requires:
- remix-ide-chrome
- remix-ide-firefox
- remix-ide-chrome-1
- remix-ide-chrome-2
- remix-ide-firefox-1
- remix-ide-firefox-2
- remix-ide-run-deploy
- deploy-remix-live:
requires:
- remix-ide-chrome
- remix-ide-firefox
- remix-ide-chrome-1
- remix-ide-chrome-2
- remix-ide-firefox-1
- remix-ide-firefox-2
- remix-ide-run-deploy
filters:
branches:
only: remix_live
- deploy-remix-alpha:
requires:
- remix-ide-chrome
- remix-ide-firefox
- remix-ide-chrome-1
- remix-ide-chrome-2
- remix-ide-firefox-1
- remix-ide-firefox-2
- remix-ide-run-deploy
filters:
branches:
only: master
- deploy-remix-beta:
requires:
- remix-ide-chrome
- remix-ide-firefox
- remix-ide-chrome-1
- remix-ide-chrome-2
- remix-ide-firefox-1
- remix-ide-firefox-2
- remix-ide-run-deploy
filters:
branches:

@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -e
BUILD_ID=${CIRCLE_BUILD_NUM:-${TRAVIS_JOB_NUMBER}}
echo "$BUILD_ID"
TEST_EXITCODE=0
npm run ganache-cli &
npm run serve &
echo 'sharing folder: ' $PWD '/apps/remix-ide/contracts' &
npm run remixd &
sleep 5
npm run build:e2e
TESTFILES=$(circleci tests glob "dist/apps/remix-ide-e2e/src/tests/**/*.spec.js" | circleci tests split --split-by=timings)
for TESTFILE in $TESTFILES; do
npx nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js $TESTFILE --env=chrome || TEST_EXITCODE=1
done
echo "$TEST_EXITCODE"
if [ "$TEST_EXITCODE" -eq 1 ]
then
exit 1
fi

@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -e
BUILD_ID=${CIRCLE_BUILD_NUM:-${TRAVIS_JOB_NUMBER}}
echo "$BUILD_ID"
TEST_EXITCODE=0
npm run ganache-cli &
npm run serve &
echo 'sharing folder: ' $PWD '/apps/remix-ide/contracts' &
npm run remixd &
sleep 5
npm run build:e2e
TESTFILES=$(circleci tests glob "dist/apps/remix-ide-e2e/src/tests/**/*.spec.js" | circleci tests split --split-by=timings)
for TESTFILE in $TESTFILES; do
npx nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js $TESTFILE --env=firefox || TEST_EXITCODE=1
done
echo "$TEST_EXITCODE"
if [ "$TEST_EXITCODE" -eq 1 ]
then
exit 1
fi

@ -57,7 +57,7 @@
"nightwatch_local_firefox": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js --env=firefox",
"nightwatch_local_chrome": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js --env=chrome",
"nightwatch_local_ballot": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/ballot.test.js --env=chrome",
"nightwatch_local_ballot_0_4_11": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/ballot_0_4_11.test.js --env=chrome",
"nightwatch_local_ballot_0_4_11": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/ballot_0_4_11.spec.js --env=firefox",
"nightwatch_local_usingWorker": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/usingWebWorker.test.js --env=chrome",
"nightwatch_local_libraryDeployment": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/libraryDeployment.test.js --env=chrome",
"nightwatch_local_solidityImport": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/solidityImport.test.js --env=chrome",

Loading…
Cancel
Save