Skip to content

Commit

Permalink
Running test coverage and uploading to coveralls
Browse files Browse the repository at this point in the history
  • Loading branch information
tuler committed Sep 1, 2021
1 parent f52d2fc commit 88636a7
Show file tree
Hide file tree
Showing 5 changed files with 885 additions and 54 deletions.
26 changes: 15 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
name: Build
on: [push]
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '14'
- run: yarn install
- run: yarn prettier
- run: yarn test
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "16"
- run: yarn install
- run: yarn prettier
- run: yarn test:coverage
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions .solcover.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
skipFiles: ["Instantiator.sol"],
};
1 change: 1 addition & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import "@nomiclabs/hardhat-waffle";
import "@nomiclabs/hardhat-ethers";
import "@typechain/hardhat";
import "hardhat-deploy";
import "solidity-coverage";

// read MNEMONIC from file or from env variable
let mnemonic = process.env.MNEMONIC;
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"prettier": "prettier --check src/**/*.ts test/**/*.ts contracts/**/*.sol",
"solhint": "solhint contracts/**/*.sol",
"start": "hardhat node",
"test": "hardhat test"
"test": "hardhat test",
"test:coverage": "hardhat coverage"
},
"scripts-info": {
"build": "Build contracts and typescript code",
Expand All @@ -45,9 +46,9 @@
"info": "Displays information about the scripts.",
"prettier": "Check code style",
"solhint": "Run solidity linter",
"test": "Run unit tests"
"test": "Run unit tests",
"test:coverage": "Run test coverage report"
},
"dependencies": {},
"devDependencies": {
"@nomiclabs/hardhat-ethers": "^2.0.2",
"@nomiclabs/hardhat-etherscan": "^2.1.6",
Expand All @@ -71,6 +72,7 @@
"rimraf": "^3.0.2",
"solhint": "^3.3.6",
"solhint-plugin-prettier": "^0.0.5",
"solidity-coverage": "^0.7.17",
"ts-generator": "^0.1.1",
"ts-node": "^10.2.1",
"typechain": "^5.1.2",
Expand Down
Loading

0 comments on commit 88636a7

Please sign in to comment.