forked from Uniswap/governance-seatbelt
-
Notifications
You must be signed in to change notification settings - Fork 2
88 lines (76 loc) · 2.91 KB
/
governance-checks.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Governance Checks
on:
schedule:
- cron: '0 */3 * * *'
push:
branches:
- main
workflow_dispatch:
jobs:
check-proposals:
strategy:
# Set fail-fast to false to ensure all Matrix runs complete even if one fails.
fail-fast: false
matrix:
include:
- DAO_NAME: 'Uniswap'
GOVERNOR_ADDRESS: '0x408ED6354d4973f66138C91495F2f2FCbd8724C3'
- DAO_NAME: 'Compound'
GOVERNOR_ADDRESS: '0xc0Da02939E1441F497fd74F78cE7Decb17B66529'
- DAO_NAME: 'Idle'
GOVERNOR_ADDRESS: '0x3D5Fc645320be0A085A32885F078F7121e5E5375'
- DAO_NAME: 'Unlock'
GOVERNOR_ADDRESS: '0x7757f7f21F5Fa9b1fd168642B79416051cd0BB94'
- DAO_NAME: 'ENS'
GOVERNOR_ADDRESS: '0x323A76393544d5ecca80cd6ef2A560C6a395b7E3'
- DAO_NAME: 'Hop'
GOVERNOR_ADDRESS: '0xed8Bdb5895B8B7f9Fdb3C087628FD8410E853D48'
name: Check all live proposals
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up node
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Install solc-select
run: pip3 install solc-select
- name: Install Slither
run: pip3 install slither-analyzer
- name: Run checks
run: yarn start
env:
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RPC_URL: ${{ secrets.RPC_URL }}
TENDERLY_ACCESS_TOKEN: ${{ secrets.TENDERLY_ACCESS_TOKEN }}
TENDERLY_USER: ${{ secrets.TENDERLY_USER }}
TENDERLY_PROJECT_SLUG: ${{ secrets.TENDERLY_PROJECT_SLUG }}
DAO_NAME: ${{ matrix.DAO_NAME }}
GOVERNOR_ADDRESS: ${{ matrix.GOVERNOR_ADDRESS }}
- name: Upload artifacts
# We always upload artifacts, even if certain proposal sims/checks failed. This is because
# we don't want to block generating all reports for all DAOs when a single one fails.
if: always()
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.DAO_NAME }}
path: reports/${{ matrix.DAO_NAME }}/${{ matrix.GOVERNOR_ADDRESS }}/