Skip to content

fix(hardhat): set foundry evm_version to shangai #218

fix(hardhat): set foundry evm_version to shangai

fix(hardhat): set foundry evm_version to shangai #218

Workflow file for this run

name: CI
permissions:
id-token: write
contents: write # Checkout
security-events: write # Upload Sarif
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Slither
run: |
pip install slither-analyzer
slither --version
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 8
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Build
run: pnpm -C packages/hardhat build
- name: Lint
run: pnpm lint
- name: Test
run: pnpm -filter '!@sifi/hardhat' packages/frontend test
- name: Foundry forge build
run: pnpm -C packages/hardhat forge-build
- name: Slither analyze
id: slither
continue-on-error: true
run: pnpm -C packages/hardhat slither:ci
- name: Check slither SARIF output existence
# Slither findings are treated as error, so we need to
# ckeck manually for sucesss by existence of SARIF file
id: check_files
uses: andstor/file-existence-action@v1
with:
files: 'packages/hardhat/results.sarif'
- name: Upload Slither SARIF file
# Only upload the SARIF file if the repository is sifiorg/sifi
# since this cannot be run in private repos
if: |
github.repository == 'sifiorg/sifi' &&
steps.check_files.outputs.files_exists == 'true'
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: packages/hardhat/results.sarif