forked from storyprotocol/protocol-core
-
Notifications
You must be signed in to change notification settings - Fork 71
54 lines (44 loc) · 1.39 KB
/
foundry_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
name: Foundry CI
on:
pull_request:
branches:
- main
jobs:
# Add a timestamp to the build
Timestamp:
uses: storyprotocol/gha-workflows/.github/workflows/reusable-timestamp.yml@main
foundry-test:
strategy:
fail-fast: true
name: Foundry Unit Test
runs-on: ubuntu-latest
needs: [Timestamp]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: recursive
fetch-depth: 0
- name: Run install
uses: borales/actions-yarn@v4
with:
cmd: install # will run `yarn install` command
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
# first, build contracts excluding the tests and scripts. Check contract sizes in this step.
- name: Run Contract Size check
run: |
forge --version
forge build --force --sizes --skip test --skip script
# This step requires full build to be run first
- name: Upgrade Safety test
run: |
forge clean && forge build --build-info
# npx @openzeppelin/upgrades-core validate out/build-info
- name: Run Forge tests
run: |
forge test -vvv --no-match-test "invariant*"
id: forge-test
- name: Run solhint
run: npx solhint contracts/**/*.sol