Skip to content

Commit 9753f04

Browse files
committed
ci: 添加标准 GitHub Actions CI(JDK 8/17/21 矩阵,全版本分支触发)
1 parent 8240c42 commit 9753f04

1 file changed

Lines changed: 54 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# CI workflow for easy4j Spring Boot Starter
2+
#
3+
# Triggers:
4+
# - push / pull_request on all version-line branches
5+
# - manual workflow_dispatch
6+
#
7+
# JDK matrix by version line:
8+
# - 2.3.x / 2.7.x : JDK 8
9+
# - 3.0.x ~ 3.5.x : JDK 17
10+
# - 4.0.x / 4.1.x : JDK 17 / 21
11+
#
12+
# Runs `mvn -B clean verify` with dependency convergence checks.
13+
name: CI
14+
15+
on:
16+
push:
17+
branches: [2.3.x, 2.7.x, 3.0.x, 3.1.x, 3.2.x, 3.3.x, 3.4.x, 3.5.x, 4.0.x, 4.1.x, master, main]
18+
pull_request:
19+
branches: [2.3.x, 2.7.x, 3.0.x, 3.1.x, 3.2.x, 3.3.x, 3.4.x, 3.5.x, 4.0.x, 4.1.x, master, main]
20+
workflow_dispatch:
21+
22+
permissions:
23+
contents: read
24+
25+
jobs:
26+
build:
27+
name: JDK ${{ matrix.java }} Build & Verify
28+
runs-on: ubuntu-latest
29+
timeout-minutes: 30
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
java: [8, 17, 21]
34+
steps:
35+
- name: Checkout source
36+
uses: actions/checkout@v4
37+
38+
- name: Set up JDK ${{ matrix.java }}
39+
uses: actions/setup-java@v4
40+
with:
41+
distribution: temurin
42+
java-version: ${{ matrix.java }}
43+
cache: maven
44+
45+
- name: Build and verify
46+
run: mvn -B --no-transfer-progress clean verify
47+
48+
- name: Upload surefire reports
49+
if: always()
50+
uses: actions/upload-artifact@v4
51+
with:
52+
name: surefire-reports-jdk${{ matrix.java }}
53+
path: target/surefire-reports
54+
retention-days: 14

0 commit comments

Comments
 (0)