2020-08-24 14:21:47 +00:00
|
|
|
version: 2.1 # use CircleCI 2.1
|
|
|
|
jobs: # a collection of steps
|
|
|
|
build: # runs not using Workflows must have a `build` job as entry point
|
|
|
|
working_directory: ~/gelato-instadapp-ci # directory where steps will run
|
|
|
|
docker: # run the steps with Docker
|
|
|
|
- image: circleci/node:12.16.2 # ...with this image as the primary container; this is where all `steps` will run
|
|
|
|
steps: # a collection of executable commands
|
|
|
|
- checkout # special step to check out source code to working directory
|
2020-11-11 16:06:07 +00:00
|
|
|
- restore_cache: # restore the dependency cache
|
2020-08-24 14:21:47 +00:00
|
|
|
# Read about caching dependencies: https://circleci.com/docs/2.0/caching/
|
|
|
|
name: Restore Yarn Package Cache
|
|
|
|
key: yarn-packages-{{ checksum "yarn.lock" }}
|
|
|
|
- run:
|
|
|
|
name: yarn install
|
|
|
|
command: yarn install --frozen-lockfile
|
|
|
|
- save_cache: # special step to save the dependency cache
|
|
|
|
name: Save Yarn Package Cache
|
|
|
|
key: yarn-packages-{{ checksum "yarn.lock" }}
|
|
|
|
paths:
|
|
|
|
- ./node_modules
|
2020-11-11 16:06:07 +00:00
|
|
|
- restore_cache: # restore hardhat compile cache
|
|
|
|
name: Restore Hardhat Compilation Cache
|
|
|
|
key: solidity-files-cache-
|
2020-08-24 14:21:47 +00:00
|
|
|
- run: # Compile
|
|
|
|
name: Compile
|
2020-11-10 18:23:22 +00:00
|
|
|
command: yarn compile
|
2020-11-11 16:06:07 +00:00
|
|
|
- save_cache: # special step to save the hardhat compile cache
|
|
|
|
name: Save Hardhat Compilation Cache
|
|
|
|
key: solidity-files-cache-{{ checksum "./cache/solidity-files-cache.json" }}
|
|
|
|
paths:
|
|
|
|
- ./cache/solidity-files-cache.json
|
2020-10-07 17:45:46 +00:00
|
|
|
- run: # Formatting
|
|
|
|
name: Prettier Check
|
|
|
|
command: yarn prettier --check .
|
|
|
|
- run: # Linting
|
|
|
|
name: ESLint
|
2020-11-10 18:23:22 +00:00
|
|
|
command: yarn lint
|
2020-11-11 16:06:07 +00:00
|
|
|
- restore_cache: # restore the Hardhat Network Fork Cache
|
2020-11-02 14:52:03 +00:00
|
|
|
name: Restore Hardhat Network Fork Cache
|
2020-11-23 09:56:20 +00:00
|
|
|
key: v3-hardhat-network-fork-cache
|
2020-08-24 14:21:47 +00:00
|
|
|
- run: # Tests
|
2020-11-10 18:23:22 +00:00
|
|
|
name: Tests using hardhat mainnet fork and gas reporter
|
2020-11-19 09:39:23 +00:00
|
|
|
command: yarn test:gas
|
2020-11-02 14:52:03 +00:00
|
|
|
- save_cache: # special step to save the Hardhat Network Fork cache
|
|
|
|
name: Save Hardhat Network Fork Cache
|
2020-11-23 09:56:20 +00:00
|
|
|
key: v3-hardhat-network-fork-cache
|
2020-11-02 14:52:03 +00:00
|
|
|
paths:
|
|
|
|
- ./cache/hardhat-network-fork
|
2020-11-11 16:06:07 +00:00
|
|
|
- run: # Codechecks
|
|
|
|
name: Codechecks gas reporting
|
|
|
|
command: npx codechecks
|
2020-08-24 14:21:47 +00:00
|
|
|
# - store_artifacts: # for display in Artifacts: https://circleci.com/docs/2.0/artifacts/
|
|
|
|
# path: coverage
|
|
|
|
# prefix: coverage
|
2020-10-07 17:45:46 +00:00
|
|
|
# See https://circleci.com/docs/2.0/deployment-integrations/ for deploy examples
|