Skip to content

Commit

Permalink
ci: add checking solidity linting to ci
Browse files Browse the repository at this point in the history
  • Loading branch information
coreyar committed Nov 3, 2022
1 parent 2c10962 commit 7056179
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,26 @@ on:
branches: [main]
workflow_dispatch:
jobs:
lint:
name: Lint
runs-on: ubuntu-18.04
steps:
- name: Check out code
uses: actions/checkout@v2

- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: 16
cache: "yarn"

- name: Install dependencies
# Hack to get around failing "ethereumjs-abi The remote archive doesn't match the expected checksum" error
run: YARN_CHECKSUM_BEHAVIOR=update yarn

- name: Lint solidity
run: yarn lint

build:
runs-on: ubuntu-18.04
env:
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"hardhat:test": "hardhat test",
"hardhat:compile": "hardhat compile",
"hardhat:coverage": "hardhat coverage",
"lint:sol": "solhint --max-warnings 0 \"contracts/**/*.sol\"",
"lint": "yarn lint:sol",
"lint:sol": "solhint \"contracts/**/*.sol\"",
"lint:sol:fix": "prettier --write \"contracts/**/*.sol\"",
"build": "rm -rf dist && tsc --declaration && hardhat compile && cp -r ./{package.json,yarn.lock,artifacts,networks,contracts,deployments,copy_contracts.sh} dist/",
"publish:dist": "yarn build && yarn publish dist -f --access public",
Expand Down

0 comments on commit 7056179

Please sign in to comment.