chore: change chain_id and modify make nuke #26
This file contains 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: slither analysis | |
on: | |
push: | |
paths: | |
- 'packages/tokamak/contracts-bedrock/**' | |
jobs: | |
analyze: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repository | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
# Add the repository to safe directories | |
- name: Add repo to git safe directories | |
run: git config --global --add safe.directory $GITHUB_WORKSPACE | |
# Setup Node.js environment | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
# Restore pnpm package cache | |
- name: Restore PNPM Package Cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.pnpm-store | |
key: pnpm-packages-v3-${{ hashFiles('pnpm-lock.yaml') }} | |
# Copy necessary tools from Docker container | |
- name: Copy foundry from Docker container | |
run: | | |
container_id=$(docker create onthertech/titan-ci-builder:latest) | |
mkdir -p $HOME/bin | |
docker cp $container_id:/usr/local/bin/cast $HOME/bin/ | |
docker cp $container_id:/usr/local/bin/anvil $HOME/bin/ | |
docker cp $container_id:/usr/local/bin/forge $HOME/bin/ | |
docker rm $container_id | |
# Set permissions for the copied tools and add them to the PATH | |
- name: Set permissions and add PATH | |
run: | | |
chmod +x $HOME/bin/* | |
echo "$HOME/bin" >> $GITHUB_PATH | |
# Install pnpm and dependencies | |
- name: Install pnpm and dependencies | |
run: | | |
npm install --global pnpm | |
pnpm install | |
# Save pnpm package cache for future runs | |
- name: Save PNPM Package Cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.pnpm-store | |
# Ensure cache key consistency | |
key: pnpm-packages-v3-${{ hashFiles('pnpm-lock.yaml') }} | |
# Build smart contracts | |
- name: Build the contracts | |
run: | | |
cd packages/tokamak/contracts-bedrock | |
forge build --build-info --skip '*/test/**' '*/scripts/**' | |
# Analyze smart contracts with Slither | |
- name: Run Slither | |
uses: crytic/[email protected] | |
with: | |
target: packages/tokamak/contracts-bedrock | |
slither-config: packages/tokamak/contracts-bedrock/slither.config.json | |
fail-on: config | |
slither-version: dev-triage-db | |
slither-args: --triage-database packages/tokamak/contracts-bedrock/slither.db.json | |
ignore-compile: true |