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

85 lines
2.0 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
export NVM_DIR="/opt/circleci/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install v18
echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV
echo "[ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"" >> $BASH_ENV
step_install_foundry: &step_install_foundry
run:
name: "Install Foundry"
working_directory: ~/
environment:
SHELL: /bin/bash
command: |-
export PATH="$PATH:$HOME/.foundry/bin"
echo 'export PATH=$PATH:$HOME/.foundry/bin' >> $BASH_ENV
curl -L https://foundry.paradigm.xyz | bash
foundryup
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:
name: Tests ( optimizer.enabled=false )
command: |
npm run test:ci
- 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
- <<: *step_install_foundry
- run:
name: Hardhat E2E
command: |
./scripts/nomiclabs.sh
workflows:
version: 2
build:
jobs:
- unit-test
- e2e-zeppelin
- e2e-nomiclabs