Skip to content

WIP: Feat/bank convex spell fork testing #160

WIP: Feat/bank convex spell fork testing

WIP: Feat/bank convex spell fork testing #160

Workflow file for this run

name: CI
# Triggers the workflow on pushes to main branch or any pull request
on:
push:
branches:
- main
pull_request:
branches: '*'
env:
## Sets environment variable
DEPLOY_ACCOUNT_KEY: ${{ secrets.DEPLOY_ACCOUNT_KEY }}
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}
ALCHEMY_ARB_API_KEY: ${{ secrets.ALCHEMY_ARB_API_KEY }}
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }}
LLAMA_API_KEY: ${{ secrets.LLAMA_API_KEY}}
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# Verify that the code is formatted correctly
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install node
uses: actions/setup-node@v1
with:
node-version: 18
- name: Cache
uses: actions/cache@v2
id: cache
with:
path: '**/node_modules'
key: yarn-v1-${{ hashFiles('**/yarn.lock') }}
- name: Install
run: yarn --immutable
if: steps.cache.outputs.cache-hit != 'true'
- name: Lint
run: yarn lint
# Verify that the build passes
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install node
uses: actions/setup-node@v1
with:
node-version: 18
- name: Cache
uses: actions/cache@v2
id: cache
with:
path: '**/node_modules'
key: yarn-v1-${{ hashFiles('**/yarn.lock') }}
- name: Install
run: yarn --immutable
if: steps.cache.outputs.cache-hit != 'true'
- name: Build
run: yarn build
# Verify that integration tests pass
test:
name: 'Run Integration Test'
# The type of runner that the job will run on
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Check out repository
uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up node
uses: actions/setup-node@v2
with:
node-version: 18
- name: Node module cache
uses: actions/cache@v2
id: cache
with:
path: '**/node_modules'
key: npm-v2-${{ hashFiles('**/yarn.lock') }}
restore-keys: npm-v2-
- name: Install dependencies
run: |
if [ -e yarn.lock ]; then
yarn install --frozen-lockfile
elif [ -e package-lock.json ]; then
npm ci
else
npm i
fi
if: steps.cache.outputs.cache-hit != 'true'
- name: Hardhat artifact cache
uses: actions/cache@v2
id: hardhat-cache
with:
path: 'artifacts'
key: artifacts-${{ hashFiles('contracts/**/*.sol') }}
restore-keys: |
artifacts-
- name: Hardhat compile
run: yarn hardhat compile
if: steps.hardhat-cache.outputs.cache-hit != 'true'
- name: Run Test
run: yarn hardhat test
timeout-minutes: 30
env:
# pass GitHub token to allow accurately detecting a build vs a re-run build
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}