remix-project mirror
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
remix-project/.circleci/config.yml

329 lines
9.1 KiB

version: 2.1
parameters:
run_flaky_tests:
type: boolean
default: true
orbs:
browser-tools: circleci/browser-tools@1.4.0
node: circleci/node@5.0.2
jobs:
build:
docker:
- image: cimg/base:current
resource_class:
xlarge
working_directory: ~/remix-project
steps:
- checkout
- node/install:
install-yarn: true
node-version: "v14.17.6"
- restore_cache:
keys:
- v1-deps-{{ checksum "yarn.lock" }}
- run: yarn
- save_cache:
key: v1-deps-{{ checksum "yarn.lock" }}
paths:
- node_modules
- run: yarn run downloadsolc_assets
- run: NX_BIN_URL=http://127.0.0.1:8080/assets/js NX_WASM_URL=http://127.0.0.1:8080/assets/js yarn build
- run: npx nx build remix-ide-e2e-src-local-plugin
- run: yarn run build:libs
- run: yarn run downloadsolc_assets_e2e
- run: mkdir persist && zip -r persist/dist.zip dist
- persist_to_workspace:
root: .
paths:
- "persist"
lint:
docker:
- image: cimg/base:current
resource_class:
xlarge
working_directory: ~/remix-project
parallelism: 35
steps:
- checkout
- node/install:
install-yarn: true
node-version: "v14.17.6"
- restore_cache:
keys:
- v1-deps-{{ checksum "yarn.lock" }}
- run: yarn
- run:
name: Remix Libs Linting
command: ./apps/remix-ide/ci/lint.sh
remix-libs:
docker:
- image: cimg/base:current
resource_class:
xlarge
working_directory: ~/remix-project
steps:
- checkout
- node/install:
install-yarn: true
node-version: "v14.17.6"
- attach_workspace:
at: .
- run: unzip ./persist/dist.zip
- restore_cache:
keys:
- v1-deps-{{ checksum "yarn.lock" }}
- run: yarn
- run: cd dist/libs/remix-tests && yarn
- run: yarn run test:libs
remix-ide-browser:
docker:
- image: cimg/base:current
resource_class:
xlarge
working_directory: ~/remix-project
parameters:
parts:
type: string
browser:
type: string
script:
type: string
parallelism: 95
steps:
- node/install:
install-yarn: true
node-version: "v14.17.6"
- browser-tools/install-chrome
- browser-tools/install-chromedriver
- browser-tools/install-firefox
- browser-tools/install-geckodriver
- run:
name: Check out previous test metadata
command: |
cat "${CIRCLE_INTERNAL_TASK_DATA}/circle-test-results/results.json" | jq .
- checkout
- attach_workspace:
at: .
- run: unzip ./persist/dist.zip
- run: ls -la ./dist/apps/remix-ide/assets/js
- restore_cache:
keys:
- v1-deps-{{ checksum "yarn.lock" }}
- run: yarn
- run:
name: Java
command: sudo apt update && sudo apt install default-jre
- run:
name: Install Selenium
command: yarn run selenium-install
- run:
name: Run Selenium
command: yarn run selenium
background: true
- run: ./apps/remix-ide/ci/<< parameters.script >> << parameters.browser >>
- store_test_results:
path: ./reports/tests
- store_artifacts:
path: ./reports/screenshots
remix-test-plugins:
docker:
- image: cimg/base:current
resource_class:
xlarge
working_directory: ~/remix-project
parameters:
script:
type: string
parallelism: 10
steps:
- node/install:
install-yarn: true
node-version: "v14.17.6"
- browser-tools/install-chrome
- browser-tools/install-chromedriver
- run:
command: |
google-chrome --version
chromedriver --version
name: Check install
- checkout
- attach_workspace:
at: .
- run: unzip ./persist/dist.zip
- restore_cache:
keys:
- v1-deps-{{ checksum "yarn.lock" }}
- run: yarn
- run:
name: Java
command: sudo apt update && sudo apt install default-jre
- run:
name: Install Selenium
command: yarn run selenium-install
- run:
name: Run Selenium
command: yarn run selenium
background: true
- run: npx nx build vyper
- run: ./apps/remix-ide/ci/<< parameters.script >>
- store_test_results:
path: ./reports/tests
- store_artifacts:
path: ./reports/screenshots
deploy-remix-live:
docker:
- image: cimg/base:current
resource_class:
xlarge
environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
- COMMIT_AUTHOR: "Circle CI"
- FILES_TO_PACKAGE: "dist/apps/remix-ide/index.html dist/apps/remix-ide/404.html dist/apps/remix-ide/*raw-loader*.js dist/apps/remix-ide/assets dist/apps/remix-ide/main*.js dist/apps/remix-ide/polyfills*.js dist/apps/remix-ide/favicon.ico dist/apps/remix-ide/vendors~app*.js dist/apps/remix-ide/app*.js"
working_directory: ~/remix-project
steps:
- checkout
- node/install:
install-yarn: true
node-version: "v14.17.6"
- run: yarn
- run: yarn run downloadsolc_assets
- run: yarn run build:production
- run:
name: Deploy
command: |
if [ "${CIRCLE_BRANCH}" == "remix_live" ]; then
./apps/remix-ide/ci/deploy_from_travis_remix-live.sh;
fi
deploy-remix-alpha:
docker:
- image: cimg/base:current
resource_class:
xlarge
environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
- COMMIT_AUTHOR: "Circle CI"
- FILES_TO_PACKAGE: "dist/apps/remix-ide/index.html dist/apps/remix-ide/404.html dist/apps/remix-ide/*raw-loader*.js dist/apps/remix-ide/assets dist/apps/remix-ide/main*.js dist/apps/remix-ide/polyfills*.js dist/apps/remix-ide/favicon.ico dist/apps/remix-ide/vendors~app*.js dist/apps/remix-ide/app*.js"
working_directory: ~/remix-project
steps:
- checkout
- node/install:
install-yarn: true
node-version: "v14.17.6"
- run: yarn
- run: yarn run downloadsolc_assets
- run: yarn run build:production
- run:
name: Deploy
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
./apps/remix-ide/ci/deploy_from_travis_remix-alpha.sh;
fi
deploy-remix-beta:
docker:
- image: cimg/base:current
resource_class:
xlarge
environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
- COMMIT_AUTHOR: "Circle CI"
- FILES_TO_PACKAGE: "dist/apps/remix-ide/index.html dist/apps/remix-ide/404.html dist/apps/remix-ide/*raw-loader*.js dist/apps/remix-ide/assets dist/apps/remix-ide/main*.js dist/apps/remix-ide/polyfills*.js dist/apps/remix-ide/favicon.ico dist/apps/remix-ide/vendors~app*.js dist/apps/remix-ide/app*.js"
working_directory: ~/remix-project
steps:
- checkout
- node/install:
install-yarn: true
node-version: "v14.17.6"
- run: yarn
- run: yarn run build:libs
- run: yarn run downloadsolc_assets
- run: yarn run build:production
- run:
name: Deploy
command: |
if [ "${CIRCLE_BRANCH}" == "remix_beta" ]; then
./apps/remix-ide/ci/deploy_from_travis_remix-beta.sh;
fi
workflows:
version: 2
run_flaky_tests:
when: << pipeline.parameters.run_flaky_tests >>
jobs:
- build
- remix-ide-browser:
requires:
- build
matrix:
parameters:
parts: ["1"]
browser: ["chrome", "firefox"]
script: ["flaky.sh"]
build_all:
unless: << pipeline.parameters.run_flaky_tests >>
jobs:
- build
- lint:
requires:
- build
- remix-libs:
requires:
- build
- remix-test-plugins:
requires:
- build
matrix:
parameters:
script: ["browser_tests_plugin_api.sh", "browser_tests_etherscan_plugin.sh", "browser_tests_vyper_plugin.sh"]
- remix-ide-browser:
requires:
- build
matrix:
parameters:
parts: ["1", "2", "3"]
browser: ["chrome", "firefox"]
script: ["browser_test.sh"]
- deploy-remix-live:
requires:
- lint
- remix-libs
- remix-ide-browser
- remix-test-plugins
filters:
branches:
only: remix_live
- deploy-remix-alpha:
requires:
- lint
- remix-libs
- remix-ide-browser
- remix-test-plugins
filters:
branches:
only: master
- deploy-remix-beta:
requires:
- lint
- remix-libs
- remix-ide-browser
- remix-test-plugins
filters:
branches:
only: remix_beta