-
Notifications
You must be signed in to change notification settings - Fork 0
119 lines (96 loc) · 2.55 KB
/
test.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: test
on:
push:
paths:
- "**.sol"
- "**.toml"
- "**.json"
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
# On-demand
workflow_dispatch: {}
jobs:
check:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
name: Foundry project
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Run Forge build
run: |
forge --version
forge build --sizes
id: build
- name: Run Forge tests
run: |
forge test -vvv
id: test
- name: Run Forge snapshot
run: forge snapshot
id: snapshot
- name: Run Forge coverage
run: forge coverage --report lcov
id: coverage
- name: Run Gas report
run: forge test --gas-report --isolate
id: gas-report
- name: Run Forge Snapshot Diff
run: forge snapshot --diff
id: snapshot_diff
- name: Run Slither
uses: crytic/[email protected]
id: slither
with:
slither-args: --compile-force-framework foundry --exclude-dependencies --checklist
sarif: results.sarif
fail-on: none
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ steps.slither.outputs.sarif }}
fork:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
name: Foundry project
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: false
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Run Forge build
run: |
forge --version
forge install
forge build --sizes
id: build
- name: Run Forge tests
run: |
forge test -vvv --rpc-url phalcon
id: test
- name: Run Forge snapshot
run: forge snapshot --rpc-url phalcon
id: snapshot
- name: Run Forge coverage
run: forge coverage --report lcov --rpc-url phalcon
id: coverage
- name: Run Gas report
run: forge test --gas-report --isolate --rpc-url phalcon
id: gas-report
- name: Run Forge Snapshot Diff
run: forge snapshot --diff --rpc-url phalcon
id: snapshot_diff