fix: add libusb to github action runners that do pnpm install #925
Workflow file for this run
  
    
      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
    
  
  
    
  | on: | |
| pull_request: | |
| paths: | |
| - target_chains/ethereum/contracts/** | |
| - governance/xc_admin/packages/xc_admin_common/** | |
| - .github/workflows/ci-ethereum-contract.yml | |
| push: | |
| branches: | |
| - main | |
| name: Ethereum Contract | |
| jobs: | |
| check: | |
| name: Foundry tests | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: target_chains/ethereum/contracts/ | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: "package.json" | |
| # Libusb is a build requirement for the node-hid package and so pnpm | |
| # install will fail if this isn't in the build environment and if a | |
| # precompiled binary isn't found. | |
| - name: Install libusb | |
| run: sudo apt install -y libusb-1.0-0-dev | |
| - uses: pnpm/action-setup@v4 | |
| name: Install pnpm | |
| with: | |
| run_install: true | |
| - name: Install Foundry | |
| uses: foundry-rs/foundry-toolchain@v1 | |
| with: | |
| version: v0.3.0 | |
| - name: Install Forge dependencies | |
| run: pnpm run install-forge-deps | |
| - name: Run tests | |
| run: forge test -vvv --deny-warnings | |
| - name: Run snapshot | |
| run: NO_COLOR=1 forge snapshot --match-contract GasBenchmark >> $GITHUB_STEP_SUMMARY |