chore: add ci for image building on merge #34
Workflow file for this run
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: Foundry tests | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: ["main"] | |
paths: | |
- "contracts/**" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
cancel-in-progress: true | |
env: | |
FOUNDRY_PROFILE: ci | |
jobs: | |
check: | |
strategy: | |
fail-fast: true | |
name: Foundry project | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./contracts/ | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- name: Check forge version | |
run: forge --version | |
- name: Check forge tree | |
run: forge tree | |
- name: Install solc-select and solc | |
run: | | |
pip3 install solc-select | |
solc-select use 0.8.19 --always-install | |
- name: Run Forge build | |
run: | | |
forge build | |
id: build | |
- name: Check forge fmt | |
run: forge fmt --check | |
- name: Run Forge tests | |
run: | | |
forge test -vvv --gas-report | |
id: test |