forked from sushi-labs/sushiswap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "fix hardhat test and dependency issues"
- Loading branch information
Showing
8 changed files
with
100 additions
and
194 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,64 +1,70 @@ | ||
# workflow pipeline | ||
name: sushiswap | ||
|
||
on: | ||
push: | ||
paths: | ||
- "**/**" | ||
- "!**/*.md/**" | ||
|
||
env: | ||
CI: true | ||
FORCE_COLOR: 2 | ||
on: ["push", "pull_request"] | ||
|
||
jobs: | ||
run: | ||
name: Node ${{ matrix.node }} on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node: ["12.x", "14.x"] | ||
node: ["14.x", "12.x"] | ||
os: ["ubuntu-latest"] | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/[email protected] | ||
- uses: actions/checkout@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
# Cache Optimization | ||
ref: ${{github.event.pull_request.head.ref}} | ||
repository: ${{github.event.pull_request.head.repo.full_name}} | ||
|
||
- uses: actions/[email protected] | ||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
- name: Nodejs ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
node-version: ${{ matrix.node-version }} | ||
check-latest: true | ||
|
||
- name: yarn install | ||
- name: Install and Compile | ||
run: | | ||
yarn install | ||
id: hardhat_install | ||
yarn build | ||
- name: hardhat test | ||
- name: Test and Coverage | ||
run: | | ||
npx hardhat test --verbose | ||
id: hh_test | ||
yarn test | ||
- name: hardhat test_gas | ||
run: | | ||
yarn run test:gas | ||
id: hh_gas | ||
mythx: | ||
runs-on: ubuntu-latest | ||
env: | ||
MYTHX_API_KEY: ${{ secrets.MYTHX }} | ||
|
||
- name: hardhat test_gas | ||
steps: | ||
- name: Nodejs 14.x | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: "14.x" | ||
check-latest: true | ||
|
||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install MythX CLI | ||
run: python -m pip install mythx-cli | ||
- name: Print version info | ||
run: | | ||
yarn run test:coverage | ||
id: hh_coverage | ||
python3 -V | ||
mythx version | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{github.event.pull_request.head.ref}} | ||
repository: ${{github.event.pull_request.head.repo.full_name}} | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
|
||
- name: Submit contracts | ||
run: mythx analyze |
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,15 +1,3 @@ | ||
{ | ||
"extends": "solhint:recommended", | ||
"plugins": ["prettier"], | ||
"rules": { | ||
"avoid-suicide": "error", | ||
"avoid-sha3": "warn", | ||
"code-complexity": ["warn", 7], | ||
"compiler-version": "off", | ||
"max-states-count": ["error", 18], | ||
"max-line-length": ["warn", 145], | ||
"not-rely-on-time": "warn", | ||
"quotes": ["warn", "double"], | ||
"prettier/prettier": "off" | ||
} | ||
"extends": "solhint:default" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"extends": "solhint:recommended", | ||
"plugins": ["prettier"], | ||
"rules": { | ||
"avoid-suicide": "error", | ||
"avoid-sha3": "warn", | ||
"code-complexity": ["warn", 7], | ||
"compiler-version": "off", | ||
"max-states-count": ["error", 18], | ||
"max-line-length": ["warn", 145], | ||
"not-rely-on-time": "warn", | ||
"quotes": ["warn", "double"], | ||
"prettier/prettier": "off" | ||
} | ||
} |
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