Skip to content

Commit 8a4d75e

Browse files
authored
Lint Create-eth instances with example extension (#98)
1 parent f3a0576 commit 8a4d75e

File tree

1 file changed

+95
-0
lines changed

1 file changed

+95
-0
lines changed
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: Lint Create-eth instances with example extension
2+
3+
on:
4+
push:
5+
branches:
6+
- example
7+
pull_request:
8+
branches:
9+
- example
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
config:
17+
[
18+
hardhat_with_extension,
19+
foundry_with_extension,
20+
no_solidity_framework_with_extension,
21+
]
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Set dummy git user
26+
run: |
27+
git config --global user.name "Dummy User"
28+
git config --global user.email "[email protected]"
29+
30+
- name: Setup Node.js 20.x
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: 20.x
34+
35+
- name: Install Foundry
36+
if: matrix.config == 'foundry_with_extension'
37+
uses: foundry-rs/foundry-toolchain@v1
38+
with:
39+
cache: false
40+
41+
- name: Install foundryup
42+
if: matrix.config == 'foundry_with_extension'
43+
run: |
44+
curl -L https://foundry.paradigm.xyz -o foundryup-init.sh
45+
bash foundryup-init.sh
46+
echo "$HOME/.config/.foundry/bin" >> $GITHUB_PATH
47+
48+
- name: Install application (Hardhat with extension configuration)
49+
if: matrix.config == 'hardhat_with_extension'
50+
env:
51+
YARN_ENABLE_IMMUTABLE_INSTALLS: false
52+
YARN_ENABLE_INLINE_BUILDS: false
53+
run: npx --yes create-eth@latest new_project_hardhat_with_extension -s hardhat -e scaffold-eth/create-eth-extensions:example
54+
55+
- name: Install application (Foundry with extension configuration)
56+
if: matrix.config == 'foundry_with_extension'
57+
env:
58+
YARN_ENABLE_IMMUTABLE_INSTALLS: false
59+
YARN_ENABLE_INLINE_BUILDS: false
60+
run: |
61+
export PATH="$HOME/.config/.foundry/bin:$PATH"
62+
npx --yes create-eth@latest new_project_foundry_with_extension -s foundry -e scaffold-eth/create-eth-extensions:example
63+
64+
- name: Install application (No solidity framework with extension configuration)
65+
if: matrix.config == 'no_solidity_framework_with_extension'
66+
env:
67+
YARN_ENABLE_IMMUTABLE_INSTALLS: false
68+
YARN_ENABLE_INLINE_BUILDS: false
69+
run: npx --yes create-eth@latest new_project_no_solidity_framework_with_extension -s none -e scaffold-eth/create-eth-extensions:example
70+
71+
- name: Run chain and deploy
72+
working-directory: new_project_${{ matrix.config }}
73+
if: matrix.config == 'hardhat_with_extension' || matrix.config == 'foundry_with_extension'
74+
run: |
75+
yarn chain &
76+
npx wait-on tcp:8545
77+
yarn deploy
78+
79+
- name: Run linting hardhat package
80+
if: matrix.config == 'hardhat_with_extension'
81+
working-directory: new_project_${{ matrix.config }}
82+
run: yarn hardhat:lint --max-warnings=0
83+
84+
- name: Run linting foundry package
85+
if: matrix.config == 'foundry_with_extension'
86+
working-directory: new_project_${{ matrix.config }}
87+
run: yarn foundry:lint
88+
89+
- name: Run linting nextjs package
90+
working-directory: new_project_${{ matrix.config }}
91+
run: yarn next:lint --max-warnings=0
92+
93+
- name: Check types nextjs package
94+
working-directory: new_project_${{ matrix.config }}
95+
run: yarn next:check-types

0 commit comments

Comments
 (0)