📝 Update README #235
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: Quality checks | |
env: | |
FOUNDRY_PROFILE: "ci" | |
# This CI workflow is responsible of running the linter and building the contracts. | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- main | |
concurrency: | |
cancel-in-progress: true | |
group: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: lts/* | |
- name: Install the Node.js dependencies | |
run: npm ci | |
- name: Run the linter and the formatter in check mode | |
run: forge fmt --check && npx solhint "{script,src,test}/**/*.sol" | |
- name: Add lint summary | |
run: | | |
echo "## Lint result" >> $GITHUB_STEP_SUMMARY | |
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
- name: Compile the contracts and print their size | |
run: forge compile --sizes | |
- name: Add compile summary | |
run: | | |
echo "## Build result" >> $GITHUB_STEP_SUMMARY | |
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY |