-
Notifications
You must be signed in to change notification settings - Fork 5
81 lines (69 loc) · 2.52 KB
/
node.js.yml
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
on: [push]
name: test
jobs:
check:
strategy:
fail-fast: true
name: Foundry project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: foundry-toolchain
uses: foundry-rs/[email protected]
- name: Set Env Vars
env:
MASTER_COPY_ADDRESS: "0xd4a1E956fFe2D07CD71c8fABf538f2BfC0e3899B"
PROXY_FACTORY_ADDRESS: "0xEAb613456d3efD309101BB02872BEdCecE2879E2"
PALMERA_MODULE_ADDRESS: "0xc74f6cAFb3e89006FE9c0E8Be8Dc06888e178F1b"
OWNER_1: "0x9CDd325E49A6a8a82288fdC3B6C14b25221D1Cfa"
OWNER_2: "0xEd4AD3605740D6a9232e05F4d8A2b3377f81a8AA"
THRESHOLD: 1
FOUNDRY_VIA_IR: true
ACCOUNTS: 300
INFURA_KEY: ${{ secrets.INFURA_KEY }}
ALCHEMY_KEY: ${{ secrets.ALCHEMY_KEY }}
run: |
touch .env
echo "MASTER_COPY_ADDRESS=$MASTER_COPY_ADDRESS" >> .env
echo "PROXY_FACTORY_ADDRESS=$PROXY_FACTORY_ADDRESS" >> .env
echo "PALMERA_MODULE_ADDRESS=$PALMERA_MODULE_ADDRESS" >> .env
echo "OWNER_1=$OWNER_1" >> .env
echo "OWNER_2=$OWNER_2" >> .env
echo "THRESHOLD=$THRESHOLD" >> .env
echo "FOUNDRY_VIA_IR=$FOUNDRY_VIA_IR" >> .env
echo "ACCOUNTS=$ACCOUNTS" >> .env
echo "INFURA_KEY=$INFURA_KEY" >> .env
echo "ALCHEMY_KEY=$ALCHEMY_KEY" >> .env
- name: Run Tests
run: forge test --no-match-contract 'Skip*'
- name: Run Coverage
run: forge test --gas-report --fuzz-runs 1000 -vvv --no-match-contract='Skip*'
- name: Install nvm and use Node version from .nvmrc
run: |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
. ~/.nvm/nvm.sh
nvm install
nvm use
- name: Setup Yarn cache
uses: actions/cache@v2
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y python3 python3-distutils g++ make
- name: Install node-gyp
run: |
npm install -g node-gyp
- name: Install dependencies using Yarn
run: |
yarn install
- name: Run Hardhat tests with Yarn
run: |
yarn test
id: hardhat-test