Skip to content

Commit 9896ecc

Browse files
committed
fix(github-actions): setup pnpm and Foundry
1 parent 226ee07 commit 9896ecc

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

.github/workflows/lint.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,24 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v4
13-
13+
- uses: pnpm/action-setup@v4
1414
- uses: actions/setup-node@v4
1515
with:
1616
node-version-file: "package.json"
1717
cache: "pnpm"
18+
- name: Install Foundry
19+
uses: foundry-rs/foundry-toolchain@v1
1820

1921
- name: Install dependencies
20-
run: pnpm install --frozen-lockfile
22+
run: GH_ACTION=true pnpm install --frozen-lockfile
2123

2224
- name: Compile contracts with types
23-
run: pnpm compile
25+
run: pnpm compileh && pnpm compilef
2426

2527
- name: Run linters
2628
run: |
2729
pnpm prettier --no-error-on-unmatched-pattern --check -u "*"
28-
pnpm solhint "contracts/**/*.sol"
30+
if [ -n "$(find contracts -name '*.sol' -print -quit)" ]; then
31+
pnpm solhint "contracts/**/*.sol"
32+
fi
2933
pnpm eslint .

.github/workflows/test.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,19 @@ jobs:
3030
runs-on: ubuntu-latest
3131
steps:
3232
- uses: actions/checkout@v4
33-
33+
- uses: pnpm/action-setup@v4
3434
- uses: actions/setup-node@v4
3535
with:
3636
node-version-file: "package.json"
3737
cache: "pnpm"
38+
- name: Install Foundry
39+
uses: foundry-rs/foundry-toolchain@v1
3840

3941
- name: Install dependencies
40-
run: pnpm install --frozen-lockfile
42+
run: GH_ACTION=true pnpm install --frozen-lockfile
4143

4244
- name: Compile contracts with types
43-
run: pnpm compile
45+
run: pnpm compileh && pnpm compilef
4446

4547
- name: Run tests with type checking
4648
run: pnpm testh:check && pnpm testf

.vscode/settings.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
"cnpm",
3232
"commitlint",
3333
"compat",
34+
"compilef",
35+
"compileh",
3436
"crytic",
3537
"depl",
3638
"docgen",

0 commit comments

Comments
 (0)