-
Notifications
You must be signed in to change notification settings - Fork 46
62 lines (58 loc) · 1.43 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
name: test
on: [pull_request]
env:
FOUNDRY_PROFILE: ci
jobs:
contracts:
name: Contracts
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Run forge fmt
run: |
forge --version
forge fmt --check
id: fmt
- name: Run forge build
run: |
forge build --sizes --deny-warnings
id: build
- name: Run forge tests
run: |
forge test -vvv --deny-warnings
id: test
- name: Run forge docs
run: |
forge doc --out docs/docs/contracts
python3 docs/scripts/forge_doc_reformat.py
- name: Commit forge docs
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: Generate Foundry docs"
file_pattern: "./docs/"
sdk:
name: SDK
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./sdk
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: "20"
registry-url: "https://registry.npmjs.org"
always-auth: true
- name: Install deps
run: npm ci
- name: Run tests
run: npm test