Skip to content

♻️ Migrate to Configuration Variables and pnpm & Bump Deps #684

♻️ Migrate to Configuration Variables and pnpm & Bump Deps

♻️ Migrate to Configuration Variables and pnpm & Bump Deps #684

Workflow file for this run

name: 🕵️‍♂️ Test smart contracts
on: [push, pull_request]
concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true
jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
node_version:
- 18
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest
run_install: false
- name: Get pnpm cache directory path
id: pnpm-cache-dir-path
run: echo "dir=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
- name: Restore pnpm cache
uses: actions/cache@v3
id: pnpm-cache
with:
path: ${{ steps.pnpm-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
- name: Install pnpm project with a clean slate
run: pnpm install --prefer-offline --frozen-lockfile
- name: Hardhat tests
run: pnpm test:hh
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Show the Foundry default config
run: forge config
env:
FOUNDRY_PROFILE: default
- name: Foundry tests
run: pnpm test:forge
env:
FOUNDRY_PROFILE: default
- name: Slither static analyser
uses: crytic/[email protected]
id: slither
with:
fail-on: config
sarif: results.sarif
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: ${{ steps.slither.outputs.sarif }}