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

75 lines
1.8 KiB

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
10 months ago
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
10 months ago
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
nvm install v14
nvm alias default 14.21.3
10 months ago
echo 'export NVM_DIR="$HOME/.nvm"' >> $BASH_ENV
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV
jobs:
unit-test:
docker:
- image: cimg/node:20.11.0
steps:
- checkout
- run:
name: Delete any old node_modules
command: |
rm -rf node_modules/
- run:
name: Install dependencies
command: |
yarn
- run:
10 months ago
name: Tests ( optimizer.enabled=false )
command: |
npm run test:ci
10 months ago
- run:
name: Tests ( viaIR=true )
command: |
npm run test:ci:viaIR
5 years ago
- run:
name: Upload coverage
command: |
bash <(curl -s https://codecov.io/bash)
e2e-zeppelin:
machine: true
environment:
NODE_OPTIONS: --max_old_space_size=8192
steps:
- checkout
- <<: *step_install_nvm
- run:
name: Zeppelin E2E
command: |
./scripts/zeppelin.sh
e2e-nomiclabs:
machine: true
steps:
- checkout
- <<: *step_install_nvm
- run:
name: Hardhat E2E
command: |
./scripts/nomiclabs.sh
workflows:
version: 2
build:
jobs:
- unit-test
- e2e-zeppelin
- e2e-nomiclabs