Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# - push / pull_request on the feature/2.0.x branch
# - manual workflow_dispatch
#
# Runs `mvn -B clean verify` which includes the JaCoCo coverage gate
# (90% line coverage, haltOnFailure=false) configured in the POM.
# Runs `./mvnw -B clean verify` which includes the JaCoCo coverage gate
# (90% line coverage, haltOnFailure=true) configured in the POM.
name: CI

on:
Expand Down Expand Up @@ -35,7 +35,10 @@ jobs:
cache: maven

- name: Build and verify with JaCoCo coverage gate
run: mvn -B --no-transfer-progress clean verify
run: ./mvnw -B --no-transfer-progress clean verify

- name: Inspect Jackson dependency tree
run: ./mvnw -B --no-transfer-progress dependency:tree -Dincludes=com.fasterxml.jackson.core:*,tools.jackson.core:*,com.fasterxml.jackson:*,tools.jackson:*

- name: Upload JaCoCo coverage report
if: always()
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ Typical scenarios:
| Response models with risk semantics | Implemented | `AntiFraudResponse`, `AntiFraudImageResponse`, `BatchAntiFraudImageResponse`, `AntiFraudVideoResponse` |
| Risk detail / hit models | Implemented | `AntiFraudDetail`, `AntiFraudImageDetail`, `AntiFraudImageDetailHits`, `BatchAntiFraudImageItem` |
| HTTP transport client | Not yet implemented | OkHttp 4.9.3 is declared in the pom; no client class exists in this branch yet |
| Unit tests | Not yet present | JaCoCo 90% line-coverage gate is configured in the pom (non-failing) |
| Unit tests | 228 JUnit tests in the current CI run | JaCoCo enforces a 90% line-coverage threshold on its measured source lines |

## 3. Requirements & Compatibility

| Item | Requirement |
| :--- | :--- |
| JDK | 17+ |
| Maven | 3.0+ (Maven Wrapper `mvnw` is included) |
| Dependencies | okhttp 4.9.3, jackson-databind 2.17.2, slf4j-api 2.0.18, lombok (provided) |
| Maven | 3.9.16 (Maven Wrapper `mvnw` is included) |
| Dependencies | okhttp 4.9.3, jackson-databind 2.22.4, slf4j-api 2.0.18, lombok (provided) |

Version lines:

Expand Down Expand Up @@ -187,11 +187,11 @@ request.getData().getImgs().add(new AntiFraudImageRequestItem()); // img / token

The build is configured with:

- JaCoCo coverage reporting plus a line-coverage check rule with a 90% minimum target (`haltOnFailure=false`, so the check reports rather than blocks).
- JaCoCo coverage reporting and a blocking 90% line-coverage check (`haltOnFailure=true`).
- Source and Javadoc jars attached at package time.
- A `central` release profile (GPG signing + Central publishing) reserved for official releases.

Note: this branch currently contains no test sources, so the coverage gate has nothing to measure yet.
The current CI report counts 12 of 12 instrumented source lines as covered (100%). Lombok-generated methods are outside that denominator, so this ratio does not mean every SDK behavior is covered.

## 10. Versioning & Branches

Expand Down
10 changes: 5 additions & 5 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ ishumei-java-sdk 为数美(Shumei)反欺诈与内容审核 API 提供类型
| 带风险语义的响应模型 | 已实现 | `AntiFraudResponse`、`AntiFraudImageResponse`、`BatchAntiFraudImageResponse`、`AntiFraudVideoResponse` |
| 风险详情/命中模型 | 已实现 | `AntiFraudDetail`、`AntiFraudImageDetail`、`AntiFraudImageDetailHits`、`BatchAntiFraudImageItem` |
| HTTP 传输客户端 | 未实现 | pom 已声明 OkHttp 4.9.3,但本分支尚无客户端类 |
| 单元测试 | 暂无 | pom 已配置 JaCoCo 90% 行覆盖率门禁(不阻断构建) |
| 单元测试 | 当前 CI 运行 228 个 JUnit 测试 | JaCoCo 对计入统计的源码行执行 90% 覆盖率门禁 |

## 3. 环境要求与兼容性

| 项目 | 要求 |
| :--- | :--- |
| JDK | 17+ |
| Maven | 3.0+(内置 Maven Wrapper `mvnw`) |
| 依赖 | okhttp 4.9.3、jackson-databind 2.17.2、slf4j-api 2.0.18、lombok(provided) |
| Maven | 3.9.16(内置 Maven Wrapper `mvnw`) |
| 依赖 | okhttp 4.9.3、jackson-databind 2.22.4、slf4j-api 2.0.18、lombok(provided) |

版本线:

Expand Down Expand Up @@ -187,11 +187,11 @@ request.getData().getImgs().add(new AntiFraudImageRequestItem()); // 每个条

构建配置:

- JaCoCo 覆盖率报告 + 行覆盖率检查规则,最低目标 90%(`haltOnFailure=false`,只报告不阻断);
- JaCoCo 覆盖率报告与阻断构建的 90% 行覆盖率检查(`haltOnFailure=true`);
- package 阶段附加源码包与 Javadoc 包;
- 提供 `central` 发布 profile(GPG 签名 + Central 发布插件),仅用于正式发布。

说明:本分支当前没有测试源码,覆盖率门禁暂无数据可校验。
当前 CI 报告计入统计的 12 行源码全部覆盖(12/12,100%)。Lombok 生成的方法不在此分母中,不能据此认定 SDK 全部行为已覆盖。

## 10. 版本与分支

Expand Down
295 changes: 295 additions & 0 deletions mvnw

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading