This repository has been archived by the owner on Sep 7, 2023. It is now read-only.
feat: deployment + bindings + tests #6
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: Tests | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
paths: ["src/**", "test/**/**", ".github/workflows/contracts.yaml"] | |
jobs: | |
test: | |
name: Contract-Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
- name: Install node | |
uses: actions/setup-node@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install solc-select | |
run: | | |
pip3 install solc-select | |
- name: Compile | |
run: | | |
forge build --build-info | |
solc-select install 0.8.21 | |
solc-select use 0.8.21 | |
- name: Run forge tests | |
run: forge test -vvv | |
- name: Patch foundry | |
run: rm foundry.toml | |
- name: Run Slither | |
uses: crytic/[email protected] | |
id: slither | |
with: | |
target: "src/Measure.sol" | |
fail-on: none | |
solc-version: 0.8.21 |