Code coverage for Solidity smart-contracts
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.
solidity-coverage/.circleci/config.yml

106 lines
2.5 KiB

version: 2.0
# Necessary for running in machine mode, which is necessary to execute the
# Zeppelin and MetaCoin 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 v8.15.0
nvm alias default v8.15.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:
5 years ago
machine: true
steps:
- checkout
5 years ago
- <<: *step_install_nvm
- run:
name: Delete any old node_modules
command: |
rm -rf node_modules/
5 years ago
- run:
name: Install yarn
command: |
npm install -g yarn
- run:
name: Install truffle (globally)
command: |
npm install -g truffle
- run:
name: Install dependencies
command: |
yarn
- run:
name: Run tests
command: |
npm run test:ci
5 years ago
- run:
name: Upload coverage
command: |
bash <(curl -s https://codecov.io/bash)
# This works but takes a while....
e2e-colony:
docker:
- image: circleci/node:10.12-stretch
working_directory: ~/colonyNetwork
steps:
- checkout
- run:
name: ColonyNetwork E2E
command: |
./scripts/run-colony.sh
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-buidler:
machine: true
steps:
- checkout
- <<: *step_install_nvm
- run:
name: Buidler E2E
command: |
./scripts/run-buidler.sh
workflows:
version: 2
build:
jobs:
- unit-test
- e2e-zeppelin
- e2e-metacoin
- e2e-buidler
# TODO: re-enable.
# At the moment we're using forks so this is pointless
#nightly:
# triggers:
# - schedule:
# cron: "0 1 * * *" # 1am UTC
# filters:
# branches:
# only:
# - master
# jobs:
#- e2e-zeppelin
#- e2e-colony