Skip to content

Merge pull request #42 from AngleProtocol/feat--add-PT-USDe-support #144

Merge pull request #42 from AngleProtocol/feat--add-PT-USDe-support

Merge pull request #42 from AngleProtocol/feat--add-PT-USDe-support #144

Workflow file for this run

name: CI
on:
push:
branches:
- main
workflow_dispatch:
inputs:
workflow_to_run:
type: choice
description: Which workflow to run?
required: true
options:
- all
- foundry-tests
pull_request:
types:
- ready_for_review
- review_requested
pull_request_review:
types: [submitted]
defaults:
run:
shell: bash
jobs:
run-linters:
if: github.ref == 'refs/heads/main' || github.event.review.state == 'approved' || github.event.action == 'ready_for_review' || github.event.action == 'review_requested'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
- uses: actions/cache@v2
with:
path: node_modules
key: yarn-${{ hashFiles('yarn.lock') }}
restore-keys: yarn-
- name: Install dependencies
run: |
npm config set //registry.npmjs.org/
yarn install --frozen-lockfile
- name: Run solhint
run: yarn solhint --fix --max-warnings 20 'contracts/**/*.sol'
foundry-tests:
if: github.ref == 'refs/heads/main' || github.event.inputs.workflow_to_run == 'all' || github.event.inputs.workflow_to_run == 'foundry-tests' || github.event.review.state == 'approved' || github.event.action == 'ready_for_review' || github.event.action == 'review_requested'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout submodules using a PAT
run: |
git config --file .gitmodules --get-regexp url | while read url; do
git config --file=.gitmodules $(echo "$url" | sed -E "s/git@github.com:|https:\/\/github.com\//https:\/\/${{ secrets.CI_PAT }}:${{ secrets.CI_PAT }}@github.com\//")
done
git submodule sync
git submodule update --init --recursive
- uses: actions/setup-node@v2
with:
node-version: 14
- uses: actions/cache@v2
with:
path: node_modules
key: yarn-${{ hashFiles('yarn.lock') }}
restore-keys: yarn-
- run: yarn install --frozen-lockfile
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Run Foundry tests
run: yarn foundry:test
env:
ETH_NODE_URI_MAINNET: ${{ secrets.ETH_NODE_URI_MAINNET }}
ETH_NODE_URI_ARBITRUM: ${{ secrets.ETH_NODE_URI_ARBITRUM }}
ETH_NODE_URI_POLYGON: ${{ secrets.ETH_NODE_URI_POLYGON }}
ETH_NODE_URI_GOERLI: ${{ secrets.ETH_NODE_URI_GOERLI }}