-
Notifications
You must be signed in to change notification settings - Fork 1
78 lines (65 loc) · 2.04 KB
/
ci.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
name: CI and Deploy to PulseChain Testnet
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
env:
FOUNDRY_PROFILE: ci
jobs:
setup:
name: Setup Foundry
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Show Forge version
run: |
forge --version
- name: Run Forge fmt
run: |
forge fmt --check
id: forge-fmt
- name: Run Forge build
run: |
forge build --sizes
id: forge-build
- name: Run Forge tests
run: |
forge test -vvv
id: forge-test
deploy:
name: Deploy to PulseChain Testnet
runs-on: ubuntu-latest
needs: setup
environment: pulsechain-testnet
if: github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Deploy MultiSigEnterpriseVault Contract
run: |
forge create src/MultiSigEnterpriseVault.sol:MultiSigEnterpriseVault \
--chain pulsechain-testnet \
--rpc-url ${{ env.PULSECHAIN_TESTNET_RPC_URL }} \
--constructor-args ${{ env.OWNER_ADDRESS }} ${{ env.INITIAL_THRESHOLD }} ${{ env.INITIAL_MULTISIG_TIMELOCK }} ${{ env.INITIAL_OWNEROVEREIDE_TIMELOCK }} \
--private-key ${{ secrets.PRIVATE_KEY }} --verify --verifier blockscout --verifier-url https://api.scan.v4.testnet.pulsechain.com/api/ | tee dist/deployment_result.txt
- name: Save deployment artifacts
run: |
cp out/MultiSigEnterpriseVault.sol/MultiSigEnterpriseVault.json dist/deployment_output.json
- name: Upload deployment artifact
uses: actions/upload-artifact@v4
with:
name: MultiSigEnterpriseVault
path: dist/