-
Notifications
You must be signed in to change notification settings - Fork 30
91 lines (70 loc) · 2.25 KB
/
foundry-reports.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
name: Foundry Reports
on: [push]
concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true
env:
MAINNET_RPC: ${{ secrets.MAINNET_RPC }}
SEPOLIA_RPC: ${{ secrets.SEPOLIA_RPC }}
jobs:
generate-gas-report:
name: Gas Reports
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Install Node
uses: actions/setup-node@v4
with:
registry-url: 'https://registry.npmjs.org'
node-version: 18.x
cache: 'yarn'
- name: Install dependencies
run: yarn --frozen-lockfile --network-concurrency 1
- name: Generate Gas Report
run: forge test --gas-report > gas-report.txt
- name: Trim Gas Report
run: grep '^|' gas-report.txt > temp && mv temp gas-report.txt
- name: Upload Gas Report
uses: actions/upload-artifact@v4
with:
name: gas-report
path: gas-report.txt
generate-coverage-report:
name: Test Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Install Node
uses: actions/setup-node@v4
with:
registry-url: 'https://registry.npmjs.org'
node-version: 18.x
cache: 'yarn'
- name: Install dependencies
run: yarn --frozen-lockfile --network-concurrency 1
- name: Generate Test Coverage Table
run: forge coverage > coverage-report.txt
- name: Trim Coverage Report
run: grep '^|' coverage-report.txt > temp && mv temp coverage-report.txt
- name: Upload Test Coverage Table
uses: actions/upload-artifact@v4
with:
name: test-coverage-report
path: coverage-report.txt
- name: Generate LCOV Test Coverage Report
run: forge coverage --report lcov
- name: Upload LCOV Test Coverage Report
uses: actions/upload-artifact@v4
with:
name: lcov-coverage-report
path: lcov.info