Skip to content

Commit

Permalink
Merge 08c7fea into 20e718e
Browse files Browse the repository at this point in the history
  • Loading branch information
Franklin Richards committed May 4, 2021
2 parents 20e718e + 08c7fea commit e57f2f6
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 6 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm i
- run: npm run test-js
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ __pycache__
.DS_Store
.history
.hypothesis/
artifacts/
build/
reports/
node_modules/
Expand Down
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ cache:
- node_modules

before_install:
- export NODE_OPTIONS=--max_old_space_size=4096
- export NODE_OPTIONS=--max_old_space_size=6144

install:
- npm install

script:
- npm run lint-contracts
- npm run test-js
- npm run prettier-check
- npm run coverage

after_script:
- npm run coverage
- cat coverage/lcov.info | coveralls
1 change: 0 additions & 1 deletion contracts/governance/Staking/WeightedStaking.sol
Original file line number Diff line number Diff line change
Expand Up @@ -319,5 +319,4 @@ contract WeightedStaking is Checkpoints {
}
return date;
}

}
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,13 @@
},
"scripts": {
"analyze-contracts": "slither .",
"prettier": "prettier --write {,*/**/}*.{js,test.js,sol}",
"lint-contracts": "solhint contracts/**/*.sol",
"prettier": "npm run prettier-sol && npm run prettier-js",
"prettier-sol": "prettier --write contracts/{**/*,**/**/*,**/**/**/*}.sol",
"prettier-js": "prettier --write tests-js/{*,**/*,**/**/*}.{js,test.js}",
"prettier-check": "npm run prettier-check-sol && npm run prettier-check-js",
"prettier-check-sol": "prettier --check contracts/{**/*,**/**/*,**/**/**/*}.sol",
"prettier-check-js": "prettier --check tests-js/{*,**/*,**/**/*}.{js,test.js}",
"lint-contracts": "solhint contracts/{**/*,**/**/*,**/**/**/*}.sol",
"test": "brownie test",
"test-js": "echo Executing pure Hardhat test cases ... && npx hardhat test && echo Executing test cases using Ganache ... && npx hardhat --config hardhat-ganache-tests.config.js --network ganache test",
"coverage": "npx hardhat coverage",
Expand Down

0 comments on commit e57f2f6

Please sign in to comment.