Gelato-automations/.circleci/config.yml

46 lines
2.1 KiB
YAML
Raw Normal View History

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
- restore_cache: # special step to restore the dependency cache
# 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
- run: # Compile
name: Compile
command: npx hardhat compile
- run: # Formatting
name: Prettier Check
command: yarn prettier --check .
- run: # Linting
name: ESLint
command: yarn eslint . && yarn lint:sol
2020-11-02 14:52:03 +00:00
- restore_cache: # special step to restore the Hardhat Network Fork Cache
# Read about caching dependencies: https://circleci.com/docs/2.0/caching/
name: Restore Hardhat Network Fork Cache
key: hardhat-network-fork
- run: # Tests
name: Tests using hardhat mainnet fork
command: npx hardhat test
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
key: hardhat-network-fork
paths:
- ./cache/hardhat-network-fork
# - store_artifacts: # for display in Artifacts: https://circleci.com/docs/2.0/artifacts/
# path: coverage
# prefix: coverage
# See https://circleci.com/docs/2.0/deployment-integrations/ for deploy examples