-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (41 loc) · 1.37 KB
/
contract-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
40
41
42
43
44
45
46
47
48
name: Contract coverage
on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]
jobs:
coverage:
name: Contract coverage
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [18.x]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
- name: Install dependencies
run: yarn install --immutable
- name: Cache contracts
uses: actions/cache@v3
with:
path: |
packages/*/cache
packages/*/artifacts
~/.cache/hardhat-nodejs/
key: ${{ runner.os }}-contracts-${{ hashFiles('packages/*/contracts/**/*.sol') }}
- name: Run coverage
if: steps.cache-contracts.outputs.cache-hit != 'true'
run: yarn coverage
- name: Upload report
if: steps.cache-contracts.outputs.cache-hit != 'true'
run: bash <(curl -s https://codecov.io/bash)
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}