Added config.yml

pull/3/head
ioedeveloper 5 years ago
parent 8b4ea4af78
commit 663836987b
  1. 193
      .circleci/config.yml
  2. 2
      apps/remix-ide/ci/browser_tests.sh
  3. 4
      apps/remix-ide/ci/browser_tests_chrome.sh
  4. 4
      apps/remix-ide/ci/browser_tests_firefox.sh
  5. 2
      apps/remix-ide/ci/browser_tests_run_deploy.sh
  6. 15
      apps/remix-ide/ci/makeMockCompiler.js
  7. 2
      apps/remix-ide/nightwatch.js
  8. 2
      package.json

@ -0,0 +1,193 @@
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
remix-ide-chrome:
docker:
# specify the version you desire here
- image: circleci/node:9.11.2-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"
- FILES_TO_PACKAGE: "apps/remix-ide/assets apps/remix-ide/background.js apps/remix-ide/build apps/remix-ide/icon.png apps/remix-ide/index.html apps/remix-ide/manifest.json apps/remix-ide/README.md apps/remix-ide/soljson.js apps/remix-ide/package.json"
working_directory: ~/remix-project
parallelism: 20
steps:
- checkout
- run: npm install
- run: npm run lint && npm run test && npm run make-mock-compiler
- run:
name: Download Selenium
command: ./node_modules/.bin/selenium-standalone install --config=../remix-project/apps/remix-ide/seleniumConfig.js
- run:
name: Start Selenium
command: ./node_modules/.bin/selenium-standalone start --config=../remix-project/apps/remix-ide/seleniumConfig.js
background: true
- run: ./apps/remix-ide/ci/browser_tests_chrome.sh
- store_test_results:
path: ./apps/remix-ide/reports/tests
- store_artifacts:
path: ./apps/remix-ide/reports/screenshots
remix-ide-firefox:
docker:
# specify the version you desire here
- image: circleci/node:9.11.2-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"
- FILES_TO_PACKAGE: "apps/remix-ide/assets apps/remix-ide/background.js apps/remix-ide/build apps/remix-ide/icon.png apps/remix-ide/index.html apps/remix-ide/manifest.json apps/remix-ide/README.md apps/remix-ide/soljson.js apps/remix-ide/package.json"
working_directory: ~/remix-project
parallelism: 20
steps:
- checkout
- run: npm install
- run: npm run lint && npm run test && npm run make-mock-compiler
- run:
name: Download Selenium
command: ./node_modules/.bin/selenium-standalone install --config=../remix-project/apps/remix-ide/seleniumConfig.js
- run:
name: Start Selenium
command: ./node_modules/.bin/selenium-standalone start --config=../remix-project/apps/remix-ide/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.sh
- store_test_results:
path: ./apps/remix-ide/reports/tests
- store_artifacts:
path: ./apps/remix-ide/reports/screenshots
remix-ide-run-deploy:
docker:
# specify the version you desire here
- image: circleci/node:9.11.2-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"
- FILES_TO_PACKAGE: "apps/remix-ide/assets apps/remix-ide/background.js apps/remix-ide/build apps/remix-ide/icon.png apps/remix-ide/index.html apps/remix-ide/manifest.json apps/remix-ide/README.md apps/remix-ide/soljson.js apps/remix-ide/package.json"
working_directory: ~/remix-project
steps:
- checkout
- run: npm install
- run: npm run lint && npm run test && npm run make-mock-compiler
- run:
name: Download Selenium
command: ./node_modules/.bin/selenium-standalone install --config=../remix-project/apps/remix-ide/seleniumConfig.js
- run:
name: Start Selenium
command: ./node_modules/.bin/selenium-standalone start --config=../remix-project/apps/remix-ide/seleniumConfig.js
background: true
- run: ./apps/remix-ide/ci/browser_tests_run_deploy.sh
- store_artifacts:
path: ./apps/remix-ide/reports/screenshots
deploy-remix-live:
docker:
# specify the version you desire here
- image: circleci/node:9.11.2-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"
- FILES_TO_PACKAGE: "apps/remix-ide/assets apps/remix-ide/background.js apps/remix-ide/build apps/remix-ide/icon.png apps/remix-ide/index.html apps/remix-ide/manifest.json apps/remix-ide/README.md apps/remix-ide/soljson.js apps/remix-ide/package.json"
working_directory: ~/remix-project
steps:
- checkout
- run: npm install
- run: npm run lint && npm run test && npm run make-mock-compiler
- run:
name: Deploy
command: |
if [ "${CIRCLE_BRANCH}" == "remix_live" ]; then
./apps/remix-ide/ci/deploy_from_travis_remix-live.sh;
fi
- store_artifacts:
path: ./apps/remix-ide/reports/screenshots
deploy-remix-alpha:
docker:
# specify the version you desire here
- image: circleci/node:9.11.2-browsers
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
resource_class: xlarge
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/mongo:3.4.4
environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
- COMMIT_AUTHOR: "Circle CI"
- FILES_TO_PACKAGE: "apps/remix-ide/assets apps/remix-ide/background.js apps/remix-ide/build apps/remix-ide/icon.png apps/remix-ide/index.html apps/remix-ide/manifest.json apps/remix-ide/README.md apps/remix-ide/soljson.js apps/remix-ide/package.json"
working_directory: ~/remix-project
steps:
- checkout
- run: npm install
- run: npm run lint && npm run test && npm run make-mock-compiler
- run:
name: Deploy
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
./apps/remix-ide/ci/deploy_from_travis_remix-alpha.sh;
fi
- store_artifacts:
path: ./apps/remix-ide/reports/screenshots
workflows:
version: 2
build_all:
jobs:
- remix-ide-chrome
- remix-ide-firefox
- remix-ide-run-deploy
- deploy-remix-live:
requires:
- remix-ide-chrome
- remix-ide-firefox
- remix-ide-run-deploy
filters:
branches:
only: remix_live
- deploy-remix-alpha:
requires:
- remix-ide-chrome
- remix-ide-firefox
- remix-ide-run-deploy
filters:
branches:
only: master

@ -4,7 +4,7 @@ set -e
setupRemixd () {
mkdir remixdSharedfolder
cd contracts
cd apps/remix-ide/contracts
echo 'sharing folder: '
echo $PWD
./../node_modules/remixd/bin/remixd -s $PWD --remix-ide http://127.0.0.1:8080 &

@ -4,7 +4,7 @@ set -e
setupRemixd () {
mkdir remixdSharedfolder
cd contracts
cd apps/remix-ide/contracts
echo 'sharing folder: '
echo $PWD
remixd -s $PWD --remix-ide http://127.0.0.1:8080 &
@ -21,7 +21,7 @@ setupRemixd
sleep 5
TESTFILES=$(circleci tests glob "./test-browser/tests/**/*.test.js" | circleci tests split --split-by=timings)
TESTFILES=$(circleci tests glob "./apps/remix-ide/test-browser/tests/**/*.test.js" | circleci tests split --split-by=timings)
npm run nightwatch_local_chrome $TESTFILES
echo "$TEST_EXITCODE"

@ -4,7 +4,7 @@ set -e
setupRemixd () {
mkdir remixdSharedfolder
cd contracts
cd apps/remix-ide/contracts
echo 'sharing folder: '
echo $PWD
remixd -s $PWD --remix-ide http://127.0.0.1:8080 &
@ -21,7 +21,7 @@ setupRemixd
sleep 5
TESTFILES=$(circleci tests glob "./test-browser/tests/**/*.test.js" | circleci tests split --split-by=timings)
TESTFILES=$(circleci tests glob "./apps/remix-ide/test-browser/tests/**/*.test.js" | circleci tests split --split-by=timings)
npm run nightwatch_local_firefox $TESTFILES
echo "$TEST_EXITCODE"

@ -4,7 +4,7 @@ set -e
setupRemixd () {
mkdir remixdSharedfolder
cd contracts
cd apps/remix-ide/contracts
echo 'sharing folder: '
echo $PWD
remixd -s $PWD --remix-ide http://127.0.0.1:8080 &

@ -4,11 +4,15 @@ var fs = require('fs')
var compiler = require('solc')
var compilerInput = require('remix-solidity').CompilerInput
var defaultVersion = 'v0.6.6+commit.6c089d02'
const path = require('path')
compiler.loadRemoteVersion(defaultVersion, (error, solcSnapshot) => {
console.log('solcSnapshot: ', solcSnapshot)
if (error) console.log(error)
var compilationResult = {}
gatherCompilationResults('./test-browser/tests/', compilationResult, solcSnapshot)
const testsFolder = path.resolve(__dirname + '/../test-browser/tests/') + '/'
gatherCompilationResults(testsFolder, compilationResult, solcSnapshot)
replaceSolCompiler(compilationResult, solcSnapshot)
})
@ -16,7 +20,7 @@ function gatherCompilationResults (dir, compilationResult, solcSnapshot) {
var filenames = fs.readdirSync(dir, 'utf8')
filenames.map(function (item, i) {
if (item.endsWith('.js')) {
var testDef = require('.' + dir + item)
var testDef = require(dir + item)
if ('@sources' in testDef) {
var sources = testDef['@sources']()
for (var files in sources) {
@ -61,7 +65,10 @@ function compile (solcSnapshot, source, optimization, addCompilationResult) {
}
function replaceSolCompiler (results, solcSnapshot) {
fs.readFile('./test-browser/mockcompiler/compiler.js', 'utf8', function (error, data) {
const compilerPath = path.resolve(__dirname + '/../test-browser/mockcompiler/compiler.js')
const soljsonPath = path.resolve(__dirname + '/../soljson.js')
fs.readFile(compilerPath, 'utf8', function (error, data) {
if (error) {
console.log(error)
process.exit(1)
@ -70,7 +77,7 @@ function replaceSolCompiler (results, solcSnapshot) {
console.log(solcSnapshot.version())
data = data + '\n\nvar mockCompilerVersion = \'' + solcSnapshot.version() + '\''
data = data + '\n\nvar mockData = ' + JSON.stringify(results) + ';\n'
fs.writeFile('./apps/remix-ide/soljson.js', data, 'utf8', function (error) {
fs.writeFile(soljsonPath, data, 'utf8', function (error) {
if (error) {
console.log(error)
process.exit(1)

@ -81,4 +81,4 @@ module.exports = {
}
}
}
}
}

@ -55,7 +55,7 @@
"browsertest": "sleep 5 && npm run nightwatch_local",
"csslint": "csslint --ignore=order-alphabetical --errors='errors,duplicate-properties,empty-rules' --exclude-list='apps/remix-ide/assets/css/font-awesome.min.css' apps/remix-ide/assets/css/",
"downloadsolc_root": "wget --no-check-certificate https://solc-bin.ethereum.org/bin/soljson-v0.6.6+commit.6c089d02.js -O soljson.js",
"make-mock-compiler": "node ci/makeMockCompiler.js",
"make-mock-compiler": "node apps/remix-ide/ci/makeMockCompiler.js",
"minify": "uglifyjs --in-source-map inline --source-map-inline -c warnings=false",
"nightwatch_parallel": "nightwatch -e chrome,firefox --config apps/remix-ide/nightwatch.js",
"nightwatch_local_firefox": "nightwatch --config apps/remix-ide/nightwatch.js --env firefox",

Loading…
Cancel
Save