bashrc妈咪何意味 #5
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: CI | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| slither: | |
| name: Static analysis (Slither) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.10' | |
| - name: Install slither | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install slither-analyzer | |
| - name: Run slither | |
| run: | | |
| slither . || true | |
| forge-test: | |
| name: Forge tests | |
| runs-on: ubuntu-latest | |
| needs: slither | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Foundry (foundryup) and verify | |
| run: | | |
| set -eux | |
| # install foundryup | |
| curl -L https://foundry.paradigm.xyz | bash -s -- -y | |
| # source bashrc to make foundryup available in PATH | |
| source $HOME/.bashrc | |
| # install foundry toolchain (forge, cast, etc.) non-interactively | |
| foundryup -y | |
| echo "$HOME/.foundry/bin" >> $GITHUB_PATH | |
| export PATH="$HOME/.foundry/bin:$PATH" | |
| # verify installation | |
| forge --version | |
| - name: Install Python deps (for other tooling) | |
| run: python -m pip install -r requirements.txt || true | |
| - name: Run forge tests | |
| run: forge test -v |