Skip to content

Commit

Permalink
Revert "fix hardhat test and dependency issues"
Browse files Browse the repository at this point in the history
  • Loading branch information
Clearwood authored May 11, 2021
1 parent 297fde5 commit 6a7a51c
Show file tree
Hide file tree
Showing 8 changed files with 100 additions and 194 deletions.
64 changes: 32 additions & 32 deletions .github/workflows/coveralls.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Coveralls

# Controls when the action will run.
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [master]
branches: [ master ]
pull_request:
branches: [master]
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -17,32 +17,32 @@ jobs:
runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v2

- name: Use Node.js 14 LTS
uses: actions/setup-node@v2
with:
node-version: "14"

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"

- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Installing dependencies
run: yarn install --frozen-lockfile

- name: yarn test:coverage
run: yarn test:coverage

- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
- uses: actions/checkout@v2

- name: Use Node.js 14 LTS
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"

- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Installing dependencies
run: yarn install --frozen-lockfile

- name: yarn test:coverage
run: yarn test:coverage

- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
44 changes: 0 additions & 44 deletions .github/workflows/mythx.yml

This file was deleted.

59 changes: 0 additions & 59 deletions .github/workflows/slither.yml

This file was deleted.

88 changes: 47 additions & 41 deletions .github/workflows/sushiswap.yml
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
14 changes: 1 addition & 13 deletions .solhint.json
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"
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sushiswap/core",
"version": "1.4.3",
"version": "1.4.2",
"license": "MIT",
"types": "./types/index.ts",
"description": "Core contracts for the SushiSwap protocol",
Expand Down Expand Up @@ -57,7 +57,7 @@
"prepublishOnly": "yarn run build && node scripts/prepublish.js"
},
"devDependencies": {
"@boringcrypto/boring-solidity": "boringcrypto/BoringSolidity#b85f13c8f048136b3d3cb7e498ad6b76da05f98c",
"@boringcrypto/boring-solidity": "boringcrypto/BoringSolidity#e06e943",
"@nomiclabs/hardhat-ethers": "^2.0.0",
"@nomiclabs/hardhat-etherscan": "^2.1.0",
"@nomiclabs/hardhat-solhint": "^2.0.0",
Expand Down
15 changes: 15 additions & 0 deletions solhint.json
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"
}
}
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
chalk "^2.0.0"
js-tokens "^4.0.0"

"@boringcrypto/boring-solidity@boringcrypto/BoringSolidity#b85f13c8f048136b3d3cb7e498ad6b76da05f98c":
version "1.1.0"
resolved "https://codeload.github.com/boringcrypto/BoringSolidity/tar.gz/b85f13c8f048136b3d3cb7e498ad6b76da05f98c"
"@boringcrypto/boring-solidity@boringcrypto/BoringSolidity#e06e943":
version "1.0.4"
resolved "https://codeload.github.com/boringcrypto/BoringSolidity/tar.gz/e06e943e7e8a168ed0395ef663a17fd71a6949a2"

"@ensdomains/ens@^0.4.4":
version "0.4.5"
Expand Down

0 comments on commit 6a7a51c

Please sign in to comment.