-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (59 loc) · 1.61 KB
/
foundry_checks.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
name: Coinroutes Dex Integration | Solidity Quality Checks
on:
push:
branches: ["main", "develop"]
pull_request:
branches: ["main", "develop"]
workflow_dispatch:
env:
FOUNDRY_PROFILE: ci
jobs:
check:
strategy:
fail-fast: true
name: Foundry project
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
submodules: recursive
ref: ${{ github.event.pull_request.head.ref }}
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Run Forge Fmt Check
run: |
forge fmt --check
id: fmt_check
- name: Run Forge build
run: |
forge --version
forge build --sizes
id: build
- name: Run Forge tests
run: |
forge test -vvv
id: test
- name: Run Code Coverage
run: |
forge coverage --report lcov
id: coverage
- name: Generate Coverage Report
uses: zgosalvez/github-actions-report-lcov@v1
with:
coverage-files: ./lcov.info
minimum-coverage: 95
artifact-name: code-coverage-report
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Compare snapshot
run: NO_COLOR=1 forge snapshot >> $GITHUB_STEP_SUMMARY
- name: Run Forge Snapshot
run: |
forge snapshot
id: snapshot
- name: Add & Commit Snapshot
uses: EndBug/add-and-commit@v9.1.3
with:
default_author: github_actions
add: ".gas-snapshot"
message: "update gas snapshot"