Skip to content

feat(foundry.toml): RPC Endpoints #100

feat(foundry.toml): RPC Endpoints

feat(foundry.toml): RPC Endpoints #100

Workflow file for this run

# foundry workflow
name: forge
on:
push:
paths:
- "**.sol"
- "**.toml"
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
# On-demand
workflow_dispatch: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
PULL_NUMBER: ${{ github.event.pull_request.number }}
RUN_ID: ${{ github.run_id }}
FORCE_COLOR: 2
jobs:
workflow:
# User-definable name of this GitHub Actions job:
# If you are self-hosting, change the following `runs-on` value:
# <https://github.com/actions/runner-images/blob/releases/ubuntu22/20230710/README.md#available-images>
# <ubuntu-22.04:sha256:0bced47fffa3361afa981854fcabcd4577cd43cebbb808cea2b1f33a3dd7f508>
name: Foundry Pipeline
runs-on: ${{ matrix.os }}
permissions:
contents: read
# required for all workflows
security-events: write
# only required for workflows in private repositories
actions: read
strategy:
fail-fast: false
matrix:
os: ['ubuntu-22.04']
steps:
- uses: actions/checkout@v4
- uses: extractions/setup-just@v2
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Run Install
id: install
run: forge install && forge install foundry-rs/forge-std --no-commit
- name: Run forge config --fix
run: forge config --fix foundry.toml
- name: Install diffutils
run: sudo apt-get install diffutils
- name: Check for changes
id: check_changes
run: |
git diff --exit-code foundry.toml || echo "changes" > changes_detected
- name: Fail if changes detected
if: steps.check_changes.outputs.changes_detected == 'changes'
run: |
echo "Changes detected in foundry.toml"
exit 1
- name: Comment on PR with changes
if: steps.check_changes.outputs.changes_detected == 'changes'
uses: peter-evans/create-or-update-comment@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.pull_request.number }}
body: |
## Changes detected in `foundry.toml`
```diff
$(git diff foundry.toml)
```
- name: Run Forge build
run: just build
id: build
- name: Run Tests
id: test
run: just test
- name: Run Slither
uses: crytic/[email protected]
id: slither
with:
fail-on: all
slither-args: --compile-force-framework foundry --exclude-dependencies --checklist
solc-version: "0.8.19"