Split ci builds

pull/5370/head
ioedeveloper 4 years ago
parent d144c23b3a
commit 6c497d0721
  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 version: 2
jobs: jobs:
remix-libs: lint:
docker: docker:
# specify the version you desire here # specify the version you desire here
- image: circleci/node:10.18.0-browsers - image: circleci/node:10.18.0-browsers
@ -23,10 +23,31 @@ jobs:
- checkout - checkout
- run: npm install - run: npm install
- run: npm run lint:libs - 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 build:libs
- run: npm run test:libs - run: npm run test:libs
remix-ide-chrome: remix-ide-chrome-1:
docker: docker:
# specify the version you desire here # specify the version you desire here
- image: circleci/node:10.18.0-browsers - image: circleci/node:10.18.0-browsers
@ -39,15 +60,12 @@ jobs:
environment: environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org" - COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
- COMMIT_AUTHOR: "Circle CI" - 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 working_directory: ~/remix-project
parallelism: 20 parallelism: 20
steps: steps:
- checkout - checkout
- run: npm install - run: npm install
- run: npm run lint
- run: npm run lint remix-ide-e2e
- run: npm run build:libs - run: npm run build:libs
- run: npm run build - run: npm run build
- run: - run:
@ -57,13 +75,47 @@ jobs:
name: Start Selenium name: Start Selenium
command: ./node_modules/.bin/selenium-standalone start --drivers.chrome.version=2.39 --drivers.chrome.baseURL=https://chromedriver.storage.googleapis.com command: ./node_modules/.bin/selenium-standalone start --drivers.chrome.version=2.39 --drivers.chrome.baseURL=https://chromedriver.storage.googleapis.com
background: true background: true
- run: ./apps/remix-ide/ci/browser_tests_chrome.sh - run: ./apps/remix-ide/ci/browser_tests_chrome_1.sh
- store_test_results: - store_test_results:
path: ./reports/tests path: ./reports/tests
- store_artifacts: - store_artifacts:
path: ./reports/screenshots 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: docker:
# specify the version you desire here # specify the version you desire here
- image: circleci/node:10.18.0-browsers - image: circleci/node:10.18.0-browsers
@ -76,15 +128,12 @@ jobs:
environment: environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org" - COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
- COMMIT_AUTHOR: "Circle CI" - 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 working_directory: ~/remix-project
parallelism: 20 parallelism: 20
steps: steps:
- checkout - checkout
- run: npm install - run: npm install
- run: npm run lint
- run: npm run lint remix-ide-e2e
- run: npm run build:libs - run: npm run build:libs
- run: npm run build - run: npm run build
- run: - run:
@ -100,7 +149,47 @@ jobs:
- run: - run:
name: Install Firefox name: Install Firefox
command: sudo dpkg -i firefox-mozilla-build_73.0.1-0ubuntu1_amd64.deb 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: - store_test_results:
path: ./reports/tests path: ./reports/tests
- store_artifacts: - store_artifacts:
@ -125,8 +214,6 @@ jobs:
steps: steps:
- checkout - checkout
- run: npm install - run: npm install
- run: npm run lint
- run: npm run lint remix-ide-e2e
- run: npm run build:libs - run: npm run build:libs
- run: npm run build - run: npm run build
- run: - run:
@ -162,7 +249,6 @@ jobs:
steps: steps:
- checkout - checkout
- run: npm install - run: npm install
- run: npm run lint
- run: npm run build:libs - run: npm run build:libs
- run: npm run build - run: npm run build
- run: - run:
@ -246,7 +332,6 @@ jobs:
steps: steps:
- checkout - checkout
- run: npm install - run: npm install
- run: npm run lint
- run: npm run build:libs - run: npm run build:libs
- run: npm run build - run: npm run build
- run: - run:
@ -260,11 +345,20 @@ workflows:
version: 2 version: 2
build_all: build_all:
jobs: jobs:
- lint
- remix-libs
requires:
- lint
- remix-ide-chrome-1:
requires:
- remix-libs
- remix-ide-chrome-2:
requires:
- remix-libs - remix-libs
- remix-ide-chrome: - remix-ide-firefox-1:
requires: requires:
- remix-libs - remix-libs
- remix-ide-firefox: - remix-ide-firefox-2:
requires: requires:
- remix-libs - remix-libs
- remix-ide-run-deploy: - remix-ide-run-deploy:
@ -272,29 +366,37 @@ workflows:
- remix-libs - remix-libs
- publish: - publish:
requires: requires:
- remix-ide-chrome - remix-ide-chrome-1
- remix-ide-firefox - remix-ide-chrome-2
- remix-ide-firefox-1
- remix-ide-firefox-2
- remix-ide-run-deploy - remix-ide-run-deploy
- deploy-remix-live: - deploy-remix-live:
requires: requires:
- remix-ide-chrome - remix-ide-chrome-1
- remix-ide-firefox - remix-ide-chrome-2
- remix-ide-firefox-1
- remix-ide-firefox-2
- remix-ide-run-deploy - remix-ide-run-deploy
filters: filters:
branches: branches:
only: remix_live only: remix_live
- deploy-remix-alpha: - deploy-remix-alpha:
requires: requires:
- remix-ide-chrome - remix-ide-chrome-1
- remix-ide-firefox - remix-ide-chrome-2
- remix-ide-firefox-1
- remix-ide-firefox-2
- remix-ide-run-deploy - remix-ide-run-deploy
filters: filters:
branches: branches:
only: master only: master
- deploy-remix-beta: - deploy-remix-beta:
requires: requires:
- remix-ide-chrome - remix-ide-chrome-1
- remix-ide-firefox - remix-ide-chrome-2
- remix-ide-firefox-1
- remix-ide-firefox-2
- remix-ide-run-deploy - remix-ide-run-deploy
filters: filters:
branches: 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_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_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": "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_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_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", "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