forked from matter-labs/zksync-era
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ba90ebf
commit 3c385c7
Showing
28 changed files
with
525 additions
and
237 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,105 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request | ||
on: pull_request | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
defaults: | ||
run: | ||
working-directory: ethereum | ||
|
||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.15.1 | ||
cache: yarn | ||
cache-dependency-path: ethereum/yarn.lock | ||
|
||
- name: Install yarn | ||
run: npm install -g yarn | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
|
||
- name: Lint | ||
run: yarn lint | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
|
||
defaults: | ||
run: | ||
working-directory: ethereum | ||
|
||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.15.1 | ||
cache: yarn | ||
cache-dependency-path: ethereum/yarn.lock | ||
|
||
- name: Install yarn | ||
run: npm install -g yarn | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
|
||
- name: Build artifacts | ||
run: yarn build | ||
|
||
- name: Create cache | ||
uses: actions/cache/save@v3 | ||
with: | ||
key: artifacts-${{ github.sha }} | ||
path: | | ||
ethereum/artifacts | ||
ethereum/cache | ||
ethereum/typechain | ||
test: | ||
needs: [build, lint] | ||
runs-on: ubuntu-latest | ||
|
||
defaults: | ||
run: | ||
working-directory: ethereum | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Checkout the repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16.15.1' | ||
node-version: 16.15.1 | ||
cache: yarn | ||
cache-dependency-path: ethereum/yarn.lock | ||
|
||
- name: Install yarn | ||
run: npm install -g yarn | ||
|
||
- name: Install dependencies | ||
run: cd ethereum && yarn install | ||
run: yarn install | ||
|
||
- name: Restore artifacts cache | ||
uses: actions/cache/restore@v3 | ||
with: | ||
fail-on-cache-miss: true | ||
key: artifacts-${{ github.sha }} | ||
path: | | ||
ethereum/artifacts | ||
ethereum/cache | ||
ethereum/typechain | ||
- name: Run tests | ||
working-directory: ethereum | ||
run: yarn test | ||
run: yarn test --no-compile |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.sol] | ||
indent_style = space | ||
indent_size = 4 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"plugins": ["prettier-plugin-solidity"], | ||
"overrides": [ | ||
{ | ||
"files": "*.sol", | ||
"options": { | ||
"parser": "solidity-parse", | ||
"printWidth": 120, | ||
"tabWidth": 4, | ||
"useTabs": false, | ||
"singleQuote": false, | ||
"bracketSpacing": false | ||
} | ||
} | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,17 @@ | ||
{ | ||
"extends": "solhint:default", | ||
"plugins": ["prettier"], | ||
"rules": { | ||
"prettier/prettier": "error", | ||
"no-inline-assembly": false | ||
} | ||
"extends": "solhint:recommended", | ||
"plugins": ["prettier"], | ||
"rules": { | ||
"prettier/prettier": ["error"], | ||
"func-visibility": ["error", { "ignoreConstructors": true }], | ||
"compiler-version": ["error", ">=0.8.0"], | ||
"max-line-length": ["error", 120], | ||
"var-name-mixedcase": "off", | ||
"func-name-mixedcase": "off", | ||
"no-inline-assembly": "off", | ||
"custom-errors": "off", | ||
"no-global-import": "off", | ||
"no-complex-fallback": "off", | ||
"immutable-vars-naming": ["warn", { "immutablesAsConstants": false }] | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"recommendations": [ | ||
"editorconfig.editorconfig", | ||
"esbenp.prettier-vscode", | ||
"nomicfoundation.hardhat-solidity" | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true, | ||
"prettier.documentSelectors": ["**/*.sol"], | ||
"solidity.formatter": "prettier" | ||
} |
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
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
Oops, something went wrong.