4
4
workflow_dispatch :
5
5
push :
6
6
branches :
7
- - master
8
7
- mainnet
9
- - testnet-goerli
8
+ - testnet-holesky
10
9
- dev
11
10
pull_request :
12
11
@@ -24,93 +23,54 @@ jobs:
24
23
test :
25
24
name : Test
26
25
runs-on : ubuntu-latest
27
- strategy :
28
- fail-fast : true
29
26
steps :
30
27
# Check out repository with all submodules for complete codebase access.
31
28
- uses : actions/checkout@v4
32
29
with :
33
30
submodules : recursive
34
31
35
32
# Install the Foundry toolchain.
36
- - name : " Install Foundry"
33
+ - name : Install Foundry
37
34
uses : foundry-rs/foundry-toolchain@v1
38
35
with :
39
36
version : stable
40
37
41
38
# Run Forge's formatting checker to ensure consistent code style.
42
- - name : " Forge Fmt"
39
+ - name : Forge Fmt
43
40
run : |
44
41
forge fmt --check
45
42
id : fmt
46
43
47
44
# Build the project and display contract sizes.
48
- - name : " Forge Build"
45
+ - name : Forge Build
49
46
run : |
50
47
forge --version
51
48
forge build --sizes
52
49
id : build
53
50
54
51
# Run local tests (unit and integration).
55
- - name : " Forge Test (Local)"
52
+ - name : Forge Test (Local)
56
53
run : forge test -vvv
57
54
58
55
# Run integration tests using a mainnet fork.
59
- - name : " Forge Test Integration (Fork)"
56
+ - name : Forge Test Integration (Fork)
60
57
run : FOUNDRY_PROFILE=forktest forge test --match-contract Integration -vvv
61
58
62
- # -----------------------------------------------------------------------
63
- # Forge Test (Intense)
64
- # -----------------------------------------------------------------------
65
-
66
- continuous-fuzzing :
67
- name : Test (Intense)
68
- runs-on : ubuntu-latest
69
- strategy :
70
- fail-fast : true
71
- steps :
72
- # Check out repository with all submodules for complete codebase access.
73
- - uses : actions/checkout@v4
74
- with :
75
- submodules : recursive
76
-
77
- # Install the Foundry toolchain.
78
- - name : " Install Foundry"
79
- uses : foundry-rs/foundry-toolchain@v1
80
- with :
81
- version : stable
82
-
83
- # Build the project and display contract sizes.
84
- - name : " Forge Build"
85
- run : |
86
- forge --version
87
- forge build --sizes
88
- id : build
89
-
90
- # Run Forge Test (Intense)
91
- - name : Forge Test (Intense)
92
- run : |
93
- echo -e "\033[1;33mWarning: This workflow may take several hours to complete.\033[0m"
94
- echo -e "\033[1;33mThis intense fuzzing workflow is optional but helps catch edge cases through extended testing.\033[0m"
95
- FOUNDRY_PROFILE=intense forge test -vvv
96
-
97
59
# -----------------------------------------------------------------------
98
60
# Forge Coverage
99
61
# -----------------------------------------------------------------------
100
62
101
63
run-coverage :
102
64
name : Coverage
103
65
runs-on : ubuntu-latest
104
- strategy :
105
- fail-fast : true
106
66
steps :
107
67
# Check out repository with all submodules for complete codebase access.
108
68
- uses : actions/checkout@v4
109
69
with :
110
70
submodules : recursive
111
71
112
72
# Install the Foundry toolchain.
113
- - name : " Install Foundry"
73
+ - name : Install Foundry
114
74
uses : foundry-rs/foundry-toolchain@v1
115
75
with :
116
76
version : stable
122
82
id : lcov
123
83
124
84
# Build the project and display contract sizes.
125
- - name : " Forge Build"
85
+ - name : Forge Build
126
86
run : |
127
87
forge --version
128
88
forge build --sizes
@@ -142,7 +102,7 @@ jobs:
142
102
path : report/*
143
103
144
104
# Check coverage threshold after uploading report
145
- - name : Check Coverage Threshold
105
+ - name : Check Coverage Threshold for >=90%
146
106
run : |
147
107
LINES_PCT=$(lcov --summary lcov.info | grep "lines" | cut -d ':' -f 2 | cut -d '%' -f 1 | tr -d '[:space:]')
148
108
FUNCTIONS_PCT=$(lcov --summary lcov.info | grep "functions" | cut -d ':' -f 2 | cut -d '%' -f 1 | tr -d '[:space:]')
@@ -180,7 +140,7 @@ jobs:
180
140
submodules : recursive
181
141
182
142
# Install the Foundry toolchain.
183
- - name : " Install Foundry"
143
+ - name : Install Foundry
184
144
uses : foundry-rs/foundry-toolchain@v1
185
145
with :
186
146
version : stable
0 commit comments