-
Notifications
You must be signed in to change notification settings - Fork 12
66 lines (56 loc) · 1.72 KB
/
codecov.yaml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Code Coverage
on: pull_request
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
SUI_VERSION: mainnet-v1.25.3
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Sui CLI and install dependencies
uses: ./.github/actions/install
with:
SUI_VERSION: ${{ env.SUI_VERSION }}
- name: Coverage
run: npm run coverage
- name: Create comment body
run: |
{
echo "### Code Coverage Summary"
echo ""
echo "<details>"
echo " <summary>Click to see the summary</summary>"
echo ""
echo '```'
cat .coverage.info
echo '```'
echo ""
echo "</details>"
echo ""
echo "<details>"
echo " <summary>Click to see the extended report</summary>"
echo ""
echo '```'
cat .coverage.extended.info
echo '```'
echo ""
echo "</details>"
} > comment.md
- name: Find Code Coverage comment
uses: peter-evans/find-comment@v3
id: find-comment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: Code Coverage Summary
- name: Create or update Code Coverage comment
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ steps.find-comment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body-path: ./comment.md
edit-mode: replace