-
Notifications
You must be signed in to change notification settings - Fork 1
95 lines (78 loc) · 2.44 KB
/
ci-dev-contracts.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
82
83
84
85
86
87
88
89
90
91
92
93
94
name: ci-dev-contracts
defaults:
run:
working-directory: packages/contracts
on:
workflow_dispatch:
push:
branches:
- "main*"
- "dev/**"
paths:
- "packages/contracts/**"
- ".github/workflows/ci-dev-contracts.yml"
jobs:
contracts-test:
runs-on: ubuntu-latest
environment: local
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Run tests
run: forge test -vvv
env:
ENVIRONMENT: local
- name: Run coverage report
run: forge coverage
env:
ENVIRONMENT: local
contracts-deploy-testnet:
runs-on: ubuntu-latest
needs: contracts-test
environment: testnet
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
# re-run the tests here on purpose to ensure quality.
- name: Run tests
run: forge test -vvv
env:
ENVIRONMENT: local
- name: Install yarn
run: |
corepack prepare yarn@stable --activate
npm install -g yarn
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
- name: Install dependencies
run: yarn install
- name: Deploy LiquidMultiTokenVault
run: yarn deploy:ci
env:
ENVIRONMENT: "testnet"
DEPLOYER_PRIVATE_KEY: ${{ secrets.BASE_SEPOLIA_DEPLOYER_PRIVATE_KEY }}
ALCHEMY_API_KEY: ${{ secrets.TESTNET_ALCHEMY_API_KEY }}
BASE_SEPOLIA_ETHERSCAN_API_KEY: ${{ secrets.BASE_SEPOLIA_ETHERSCAN_API_KEY }}
SUPABASE_SERVICE_ROLE_KEY: "" # don't update supabase here
DEPLOY_SCRIPT: "script/DeployLiquidMultiTokenVault.s.sol:DeployLiquidMultiTokenVault"
- name: Deploy contracts and export to Test supabase
run: yarn deploy:ci
env:
ENVIRONMENT: "testnet"
DEPLOYER_PRIVATE_KEY: ${{ secrets.BASE_SEPOLIA_DEPLOYER_PRIVATE_KEY }}
ALCHEMY_API_KEY: ${{ secrets.TESTNET_ALCHEMY_API_KEY }}
BASE_SEPOLIA_ETHERSCAN_API_KEY: ${{ secrets.BASE_SEPOLIA_ETHERSCAN_API_KEY }}
SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.TEST_SUPABASE_SERVICE_ROLE_KEY }}