-
Notifications
You must be signed in to change notification settings - Fork 50
39 lines (31 loc) · 1 KB
/
coverage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# This workflow runs the tests with code coverage to analyze how much
# Solidity code in the smart contracts is covered by the tests.
# It then submit the code coverage report to coveralls.io.
name: Solidity Code coverage
on:
push:
branches:
- "develop"
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js v16
uses: actions/setup-node@v2
with:
node-version: "16.x"
cache: "npm"
- name: Install dependencies
if: steps.build-cache.outputs.cache-hit != 'true'
run: npm ci
# This will also generate the Typechain types used by the Chai tests
- name: Build contract artifacts
run: npx hardhat compile
- name: Run tests with coverage
run: npm run test:coverage
- name: Upload to Coveralls
uses: coverallsapp/github-action@master
with:
path-to-lcov: ./coverage/lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}