mirror of openzeppelin-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.
 
 
 
 
 
openzeppelin-contracts/.circleci/config.yml

82 lines
1.7 KiB

version: 2
# 2.1 does not yet support local run
# unless with workaround. For simplicity just use it.
# https://github.com/CircleCI-Public/circleci-cli/issues/79
aliases:
- &defaults
docker:
- image: circleci/node:10
- &npm_install_if_necessary
run:
name: Install npm dependencies
command: |
if [ ! -d node_modules ]; then
npm ci
fi
- &cache_key_node_modules
key: v1-node_modules-{{ checksum "package-lock.json" }}
jobs:
dependencies:
<<: *defaults
steps:
- checkout
- restore_cache:
<<: *cache_key_node_modules
- *npm_install_if_necessary
- save_cache:
paths:
- node_modules
<<: *cache_key_node_modules
lint:
<<: *defaults
steps:
- checkout
- restore_cache:
<<: *cache_key_node_modules
- *npm_install_if_necessary
- run:
name: Linter
command: npm run lint
test:
<<: *defaults
steps:
- checkout
- restore_cache:
<<: *cache_key_node_modules
- *npm_install_if_necessary
- run:
name: Unit tests
command: npm run test
coverage:
<<: *defaults
steps:
- checkout
- restore_cache:
<<: *cache_key_node_modules
- *npm_install_if_necessary
- run:
name: Unit tests with coverage report
command: npm run coverage
# TODO(xinbenlv, #1839): run SOLC_NIGHTLY to be run but allow it to fail.
workflows:
version: 2
everything:
jobs:
- dependencies
- lint:
requires:
- dependencies
- test:
requires:
- dependencies
- coverage:
requires:
- dependencies