Skip to content

Commit 08e5835

Browse files
committed
feat: 添加Codecov覆盖率报告集成
- 更新GitHub Actions工作流支持MoonBit覆盖率 - 添加codecov.yml配置文件 - 更新README中的Codecov徽章链接
1 parent 4cf6a9d commit 08e5835

File tree

4,220 files changed

+397315
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,220 files changed

+397315
-5
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,15 @@ jobs:
2626
2727
- name: Generate Coverage Report
2828
run: |
29-
# 这里需要根据 MoonBit 的覆盖率工具来配置
30-
# 目前使用模拟的覆盖率数据
31-
mkdir -p coverage
32-
echo '{"coverage": 100, "files": ["src/reactivex.mbt"]}' > coverage/coverage.json
29+
# 运行MoonBit测试并生成覆盖率
30+
moon test --coverage
31+
moon coverage bisect.coverage --format=lcov > coverage.lcov
3332
3433
- name: Upload Coverage to Codecov
3534
uses: codecov/codecov-action@v4
3635
with:
3736
token: ${{ secrets.CODECOV_TOKEN }}
38-
file: ./coverage/coverage.json
37+
file: ./coverage.lcov
3938
flags: unittests
4039
name: codecov-umbrella
4140
fail_ci_if_error: false

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# ReactiveX for MoonBit
22

3+
[![codecov](https://codecov.io/gh/CGaaaaaa/ReactiveX/branch/main/graph/badge.svg)](https://codecov.io/gh/CGaaaaaa/ReactiveX)
34
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
45
[![Tests Passing](https://img.shields.io/badge/Tests-Passing-brightgreen.svg)](src/test.mbt)
56

README_zh_CN.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# ReactiveX for MoonBit
22

3+
[![codecov](https://codecov.io/gh/CGaaaaaa/ReactiveX/branch/main/graph/badge.svg)](https://codecov.io/gh/CGaaaaaa/ReactiveX)
34
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
45
[![Tests Passing](https://img.shields.io/badge/Tests-Passing-brightgreen.svg)](src/test.mbt)
56

codecov.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
coverage:
2+
status:
3+
project:
4+
default:
5+
target: auto
6+
threshold: 1%
7+
informational: true
8+
patch:
9+
default:
10+
target: auto
11+
threshold: 1%
12+
informational: true
13+
14+
comment:
15+
layout: "header,diff,flags,files,footer"
16+
behavior: default
17+
require_changes: false
18+
require_base: no
19+
require_head: yes
20+
21+
parsers:
22+
lcov:
23+
branch_detection:
24+
conditional: yes
25+
loop: yes
26+
method: no
27+
macro: no
28+
29+
ignore:
30+
- "node_modules"
31+
- "target"
32+
- "_coverage"
33+
- "**/*.json"

node_modules/.bin/browserslist

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/create-jest

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/esparse

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/esvalidate

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/import-local-fixture

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/jest

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)