This repository was archived by the owner on Apr 20, 2026. It is now read-only.
Repository navigation
115 lines (110 loc) · 3.86 KB
/
Copy pathci.yml
File metadata and controls
115 lines (110 loc) · 3.86 KB
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: ci
on:
push:
branches: [main]
pull_request:
env:
FOUNDRY_PROFILE: ci
jobs:
tests:
strategy:
fail-fast: true
name: Tests
runs-on: ubuntu-latest
env:
OPTIMISM_RPC: ${{ secrets.OPTIMISM_RPC }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly-5b7e4cb3c882b28f3c32ba580de27ce7381f415a
- name: RPC Cache
uses: actions/cache@v3
with:
path: |
~/.foundry/cache/rpc
key: ${{ runner.os }}-rpc-${{ hashFiles('**/ForkBlock.sol') }}
- name: Build Cache
uses: actions/cache@v3
with:
path: |
cache/
out/
key: ${{ runner.os }}-build-${{ github.run_id }}
restore-keys: ${{ runner.os }}-build-
- name: Run Forge build
id: build
run: |
forge --version
forge build --sizes
- name: Run Forge tests
id: test
run: forge test -vv --match-path "test/*.t.sol"
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Dependencies
run: yarn
- name: Lint
run: yarn lint
deploy:
strategy:
fail-fast: true
name: Deploy
runs-on: ubuntu-latest
env:
PRIVATE_KEY: "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly-5b7e4cb3c882b28f3c32ba580de27ce7381f415a
- name: Build Cache
uses: actions/cache@v3
with:
path: |
cache/
out/
key: ${{ runner.os }}-build-${{ github.run_id }}
restore-keys: ${{ runner.os }}-build-
- name: Run Forge build
id: build
run: |
forge --version
forge build --sizes
- name: Start Anvil
run: anvil --fork-url ${{ secrets.OPTIMISM_RPC }} &
- name: Wait for Anvil to start running
run: sleep 10
- name: Deploy Liquidation Points Claimer
run: forge script script/deployments/00_LiquidationPoints.s.sol --fork-url http://localhost:8545 --broadcast
- name: Deploy Tokenomics
run: forge script script/deployments/01_Tokenomics.s.sol --fork-url http://localhost:8545 --broadcast
- name: Test Tokenomics
run: forge test -vv --match-path script/deployments/01_Tokenomics.s.sol --fork-url http://localhost:8545
- name: Deploy Protocol
run: forge script script/deployments/02_Protocol.s.sol --fork-url http://localhost:8545 --broadcast
- name: Test Protocol
run: forge test -vv --match-path script/deployments/02_Protocol.s.sol --fork-url http://localhost:8545
- name: Deploy Chainlink Automation Setup
run: forge script script/deployments/03_ChainlinkAutomationSetup.s.sol --fork-url http://localhost:8545 --broadcast
- name: Test Chainlink Automation Setup
run: forge test -vv --match-path script/deployments/03_ChainlinkAutomationSetup.s.sol --fork-url http://localhost:8545
- name: Enable Fees
run: forge script script/deployments/04_EnableFees.s.sol --fork-url http://localhost:8545 --broadcast
- name: Test Enable Fees
run: forge test -vv --match-path script/deployments/04_EnableFees.s.sol --fork-url http://localhost:8545
- name: Deploy ProxyOwner
run: forge script script/deployments/05_ProxyOwner.s.sol --fork-url http://localhost:8545 --broadcast
- name: Test ProxyOwner
run: forge test -vv --match-path script/deployments/05_ProxyOwner.s.sol --fork-url http://localhost:8545