Skip to content

Commit 8e4a3fd

Browse files
committed
tests: code coverage reports
1 parent 0c06e99 commit 8e4a3fd

File tree

5 files changed

+18
-11
lines changed

5 files changed

+18
-11
lines changed

.github/workflows/npmtest.yml

+12-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,17 @@ jobs:
2020
uses: actions/setup-node@v1
2121
with:
2222
node-version: ${{ matrix.node-version }}
23-
- run: yarn install --non-interactive --frozen-lockfile
23+
- name: Install packages
24+
run: yarn install --non-interactive --frozen-lockfile
2425
env:
2526
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
26-
- run: yarn test
27+
- name: Run tests
28+
run: yarn test:coverage
29+
- name: Upload coverage report
30+
uses: codecov/codecov-action@v2
31+
with:
32+
token: ${{ secrets.CODECOV_TOKEN }}
33+
files: ./coverage.json
34+
flags: unittests
35+
name: graphprotocol-contracts
36+
fail_ci_if_error: true

.gitignore

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
# Ignore zeppelin contracts
21
node_modules/
32

43
# Ignore build stuff
54
cache/
65
build/
76
dist/
87

9-
# Coverage tests
10-
coverage/
11-
128
# Hardhat cache
139
cached/
1410

@@ -20,5 +16,6 @@ bin/
2016
.DS_Store
2117
.vscode
2218

23-
# Sliter
19+
# Coverage and other reports
2420
/reports
21+
coverage.json

hardhat.config.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ import 'hardhat-contract-sizer'
1818
import '@tenderly/hardhat-tenderly'
1919
import '@openzeppelin/hardhat-upgrades'
2020
import '@typechain/hardhat'
21-
22-
// TODO: Not supported for now in hardhat
23-
// usePlugin('solidity-coverage')
21+
import 'solidity-coverage'
2422

2523
// Tasks
2624

scripts/coverage

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
set -eo pipefail
44

5-
yarn compile
5+
yarn build
66
npx hardhat coverage $@

test/curation/curation.test.ts

+2
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,8 @@ describe('Curation', () => {
460460

461461
describe('conservation', async function () {
462462
it('should match multiple deposits and redeems back to initial state', async function () {
463+
this.timeout(60000) // increase timeout for test runner
464+
463465
const totalDeposits = toGRT('1000000000')
464466

465467
// Signal multiple times

0 commit comments

Comments
 (0)