Skip to content

Commit 71d52cd

Browse files
Add comments
1 parent 40c4f58 commit 71d52cd

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

.github/workflows/coverage.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
on:
22
pull_request:
33
branches:
4-
- feature/* # TODO: Remove it
54
- develop
65
- main
76

@@ -17,7 +16,7 @@ jobs:
1716
run: (npm run coverage 2>&1) | tee /tmp/coverage.out | cat
1817
- name: Extract coverage
1918
run: echo "COVERAGE=$(cat /tmp/coverage.out | grep "Global test coverage")" >> $GITHUB_ENV
20-
- name: Create coverage check run # Publish coverage summary to Github PR checks
19+
- name: Display coverage in Github PR checks
2120
# See https://docs.github.com/en/rest/checks/runs?apiVersion=2022-11-28#create-a-check-run
2221
# and https://www.kenmuse.com/blog/creating-github-checks/
2322
env:

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Changelog
22

33
## vNext
4+
- Display coverage in Github PR checks. (#26)
45
- Add integration test suite. (#21)
56
- Add unit test suite. (#20)
67

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ A subgraph to explore the PoCo smarcontracts
44

55
[CHANGELOG](./CHANGELOG.md)
66

7+
# Setup coverage⁠
8+
9+
> In order for Matchstick to check which handlers are being run, those handlers need to be exported from the test file.
10+
11+
Check how to export handlers with [Matchstick - Test Coverage documentation](https://thegraph.com/docs/en/subgraphs/developing/creating/unit-testing-framework/#test-coverage).
12+
13+
> [!NOTE]
14+
> Since Matchstick code coverage is in very early stages, Matchstick cannot check for branch coverage, but rely on the assertion that a given handler has been called.
15+
16+
717
## local dev
818

919
run local services:

0 commit comments

Comments
 (0)