Skip to content

Commit

Permalink
Merge pull request #71 from FIL-Builders/update-lighthouse-ci
Browse files Browse the repository at this point in the history
Feat: Add CI to Lighthouse Integration
  • Loading branch information
xBalbinus authored Nov 25, 2024
2 parents 6041b17 + 3972680 commit 30a981b
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 6 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Lint
on:
push:
branches:
- main
- '*'
pull_request:
branches:
- main
Expand All @@ -27,17 +27,25 @@ jobs:
node-version: ${{ matrix.node }}
cache: yarn

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Install dependencies
run: yarn install --immutable

- name: Run hardhat node, deploy contracts (& generate contracts typescript output)
run: yarn chain & yarn deploy
- name: Compile contracts
run: |
cd packages/hardhat
yarn hardhat clean
yarn compile
- name: Run nextjs lint
run: yarn next:lint --max-warnings=0
run: yarn next:lint

- name: Check typings on nextjs
run: yarn next:check-types

- name: Run hardhat lint
run: yarn hardhat:lint --max-warnings=0
run: yarn hardhat:lint
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@
"fork": "yarn workspace @fil-frame/hardhat fork",
"generate": "yarn workspace @fil-frame/hardhat run scripts/generateAccount.ts",
"flatten": "yarn workspace @fil-frame/hardhat flatten",
"lint": "yarn workspace @fil-frame/hardhat eslint --config ./.eslintrc.json --ignore-path ./.eslintignore ./*.ts ./deploy/**/*.ts ./scripts/**/*.ts ./test/**/*.ts",
"next:lint": "yarn workspace @fil-frame/hardhat eslint --config ./.eslintrc.json --ignore-path ./.eslintignore ./*.ts ./deploy/**/*.ts ./scripts/**/*.ts ./test/**/*.ts",
"next:check-types": "yarn workspace @fil-frame/nextjs check-types",
"lint-staged": "yarn workspace @fil-frame/hardhat eslint --config ./.eslintrc.json --ignore-path ./.eslintignore",
"format": "yarn workspace @fil-frame/hardhat prettier --write ./*.ts ./deploy/**/*.ts ./scripts/**/*.ts ./test/**/*.ts",
"verify": "yarn workspace @fil-frame/hardhat etherscan-verify",
"hardhat-verify": "yarn workspace @fil-frame/hardhat verify",
"hardhat:lint": "yarn workspace @fil-frame/hardhat lint",
"deploy": "yarn workspace @fil-frame/hardhat deploy",
"deploy:verify": "yarn workspace @fil-frame/hardhat deploy:verify",
"chain": "yarn workspace @fil-frame/hardhat chain",
Expand Down
8 changes: 8 additions & 0 deletions packages/hardhat/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# folders
artifacts
cache
contracts
node_modules/
typechain-types
# files
**/*.json
20 changes: 20 additions & 0 deletions packages/hardhat/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"env": {
"node": true
},
"parser": "@typescript-eslint/parser",
"extends": [
"plugin:prettier/recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-explicit-any": "off",
"prettier/prettier": [
"warn",
{
"endOfLine": "auto"
}
]
}
}
19 changes: 19 additions & 0 deletions packages/hardhat/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"arrowParens": "avoid",
"printWidth": 120,
"tabWidth": 2,
"trailingComma": "all",
"overrides": [
{
"files": "*.sol",
"options": {
"printWidth": 80,
"tabWidth": 4,
"useTabs": true,
"singleQuote": false,
"bracketSpacing": true,
"explicitTypes": "always"
}
}
]
}

0 comments on commit 30a981b

Please sign in to comment.