|
|
|
version: 2.1
|
|
|
|
|
|
|
|
orbs:
|
|
|
|
win: circleci/windows@2.2.0
|
|
|
|
|
|
|
|
# Necessary for running in machine mode,
|
|
|
|
# which is necessary to execute the E2E scripts
|
|
|
|
step_install_nvm: &step_install_nvm
|
|
|
|
run:
|
|
|
|
name: "Install nvm for machine"
|
|
|
|
command: |
|
|
|
|
set +e
|
|
|
|
export NVM_DIR="/opt/circleci/.nvm"
|
|
|
|
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
|
|
|
nvm install v12.16.0
|
|
|
|
nvm alias default v12.16.0
|
|
|
|
echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV
|
|
|
|
echo "[ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"" >> $BASH_ENV
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
unit-test:
|
|
|
|
docker:
|
|
|
|
- image: circleci/node:12
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
name: Delete any old node_modules
|
|
|
|
command: |
|
|
|
|
rm -rf node_modules/
|
|
|
|
- run:
|
|
|
|
name: Install truffle (globally)
|
|
|
|
command: |
|
|
|
|
sudo npm install -g truffle
|
|
|
|
- run:
|
|
|
|
name: Install dependencies
|
|
|
|
command: |
|
|
|
|
yarn
|
|
|
|
- run:
|
|
|
|
name: Run tests
|
|
|
|
command: |
|
|
|
|
npm run test:ci
|
|
|
|
- run:
|
|
|
|
name: Upload coverage
|
|
|
|
command: |
|
|
|
|
bash <(curl -s https://codecov.io/bash)
|
|
|
|
e2e-zeppelin:
|
|
|
|
machine: true
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- <<: *step_install_nvm
|
|
|
|
- run:
|
|
|
|
name: Zeppelin E2E
|
|
|
|
command: |
|
|
|
|
./scripts/run-zeppelin.sh
|
|
|
|
e2e-metacoin:
|
|
|
|
machine: true
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- <<: *step_install_nvm
|
|
|
|
- run:
|
|
|
|
name: MetaCoin E2E
|
|
|
|
command: |
|
|
|
|
./scripts/run-metacoin.sh
|
|
|
|
e2e-metacoin-windows:
|
|
|
|
executor: win/default
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
name: Windows Metacoin E2E
|
|
|
|
command: |
|
|
|
|
bash ./scripts/run-metacoin.sh
|
|
|
|
e2e-nomiclabs:
|
|
|
|
machine: true
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- <<: *step_install_nvm
|
|
|
|
- run:
|
|
|
|
name: Buidler & Hardhat E2E
|
|
|
|
command: |
|
|
|
|
./scripts/run-nomiclabs.sh
|
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
build:
|
|
|
|
jobs:
|
|
|
|
- unit-test
|
|
|
|
# Temporarily disabled due to unskipped GSN gas measurement tests
|
|
|
|
# - e2e-zeppelin
|
|
|
|
- e2e-metacoin
|
|
|
|
- e2e-metacoin-windows
|
|
|
|
- e2e-nomiclabs
|