Skip to content

Commit 17539c0

Browse files
xlorneclaude
andcommitted
ci: CI 迁移至 GitHub Actions,接入 Codecov 覆盖率上传
- 新增 .github/workflows/ci.yml:JDK 17 编译 + travis profile 单元测试 + jacoco 覆盖率上传 Codecov(CODECOV_TOKEN 使用仓库密钥), 写法参考 https://github.com/codingapi/flow-engine/blob/main/.github/workflows/ci.yml - 移除 .travis.yml(含明文 CODECOV_TOKEN,已轮换至 GitHub 仓库密钥) - README 徽章:Travis CI 徽章替换为 GitHub Actions Build 徽章, Codecov 徽章指向 17.3.x 分支 Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 4de1bf4 commit 17539c0

3 files changed

Lines changed: 43 additions & 23 deletions

File tree

.github/workflows/ci.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, dev, 2.x, 8.2.x, 17.3.x ]
6+
pull_request:
7+
branches: [ main, dev, 2.x, 8.2.x, 17.3.x ]
8+
9+
concurrency: ${{ github.workflow }}-${{ github.ref }}
10+
11+
jobs:
12+
build:
13+
name: Build & Test
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout Repo
17+
uses: actions/checkout@v4
18+
19+
- name: Set up JDK 17
20+
uses: actions/setup-java@v4
21+
with:
22+
distribution: temurin
23+
java-version: 17
24+
cache: maven
25+
26+
- name: Compile
27+
run: ./mvnw clean compile -P travis
28+
29+
- name: Test
30+
run: ./mvnw test -P travis
31+
32+
- name: Upload coverage to Codecov
33+
uses: codecov/codecov-action@v5
34+
with:
35+
token: ${{ secrets.CODECOV_TOKEN }}
36+
files: springboot-starter/target/site/jacoco/jacoco.xml,springboot-starter-script/target/site/jacoco/jacoco.xml,springboot-starter-security/target/site/jacoco/jacoco.xml,springboot-starter-data-fast/target/site/jacoco/jacoco.xml,springboot-starter-data-authorization/target/site/jacoco/jacoco.xml
37+
fail_ci_if_error: true
38+
verbose: true
39+
40+
- name: Install
41+
run: ./mvnw install -P travis -DskipTests

.travis.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/codingapi/springboot-framework/blob/main/LICENSE)
22
[![Maven Central](https://img.shields.io/maven-central/v/com.codingapi.springboot/springboot-starter.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.codingapi.springboot%22%20AND%20a:%22springboot-starter%22)
3-
[![Build Status](https://app.travis-ci.com/codingapi/springboot-framework.svg?branch=main)](https://app.travis-ci.com/codingapi/springboot-framework)
4-
[![codecov](https://codecov.io/gh/codingapi/springboot-framework/branch/main/graph/badge.svg?token=Gl9LjJV6y4)](https://codecov.io/gh/codingapi/springboot-framework)
3+
[![Build](https://img.shields.io/github/actions/workflow/status/codingapi/springboot-framework/ci.yml?label=Build&logo=github)](https://github.com/codingapi/springboot-framework/actions)
4+
[![Codecov](https://codecov.io/gh/codingapi/springboot-framework/branch/17.3.x/graph/badge.svg)](https://codecov.io/gh/codingapi/springboot-framework)
55

66
# springboot-framework | Springboot领域驱动开发
77

0 commit comments

Comments
 (0)