build: add the workaround to ignore Foundry tests when compiling with… #8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Testing | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "**.ts" | |
| - "**.js" | |
| - "**.sol" | |
| - "!**/.*" | |
| - "!**.md" | |
| - "!**.txt" | |
| - "!**.sh" | |
| - "!**.config.*" | |
| - "hardhat.config.ts" | |
| pull_request: | |
| paths: | |
| - "**.ts" | |
| - "**.js" | |
| - "**.sol" | |
| - "!**/.*" | |
| - "!**.md" | |
| - "!**.txt" | |
| - "!**.sh" | |
| - "!**.config.*" | |
| - "hardhat.config.ts" | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: "package.json" | |
| cache: "pnpm" | |
| - uses: foundry-rs/foundry-toolchain@v1 | |
| - name: Install dependencies | |
| run: GH_ACTION=true pnpm install --frozen-lockfile | |
| - name: Compile contracts with types | |
| run: pnpm compileh && pnpm compilef | |
| - name: Run tests with type checking | |
| run: pnpm testh:check && pnpm testf |