|
| 1 | +name: Lint Installed Example |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - example-gh-action |
| 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 | + run: npx create-eth@latest --yes new_project_hardhat_with_extension -s hardhat -e scaffold-eth/create-eth-extensions:example |
| 51 | + |
| 52 | + - name: Install application (Foundry with extension configuration) |
| 53 | + if: matrix.config == 'foundry_with_extension' |
| 54 | + run: | |
| 55 | + export PATH="$HOME/.config/.foundry/bin:$PATH" |
| 56 | + npx create-eth@latest --yes new_project_foundry_with_extension -s foundry -e scaffold-eth/create-eth-extensions:example |
| 57 | +
|
| 58 | + - name: Install application (No solidity framework with extension configuration) |
| 59 | + if: matrix.config == 'no_solidity_framework_with_extension' |
| 60 | + run: npx create-eth@latest --yes new_project_no_solidity_framework_with_extension -s none -e scaffold-eth/create-eth-extensions:example |
| 61 | + |
| 62 | + - name: Run chain and deploy |
| 63 | + working-directory: new_project_${{ matrix.config }} |
| 64 | + if: matrix.config == 'hardhat_with_extension' || matrix.config == 'foundry_with_extension' |
| 65 | + run: | |
| 66 | + yarn chain & |
| 67 | + npx wait-on tcp:8545 |
| 68 | + yarn deploy |
| 69 | +
|
| 70 | + - name: Run linting hardhat package |
| 71 | + if: matrix.config == 'hardhat_with_extension' |
| 72 | + working-directory: new_project_${{ matrix.config }} |
| 73 | + run: yarn hardhat:lint --max-warnings=0 |
| 74 | + |
| 75 | + - name: Run linting foundry package |
| 76 | + if: matrix.config == 'foundry_with_extension' |
| 77 | + working-directory: new_project_${{ matrix.config }} |
| 78 | + run: yarn foundry:lint |
| 79 | + |
| 80 | + - name: Run linting nextjs package |
| 81 | + working-directory: new_project_${{ matrix.config }} |
| 82 | + run: yarn next:lint --max-warnings=0 |
| 83 | + |
| 84 | + - name: Check types nextjs package |
| 85 | + working-directory: new_project_${{ matrix.config }} |
| 86 | + run: yarn next:check-types |
0 commit comments