-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (56 loc) · 1.77 KB
/
Copy pathci.yml
File metadata and controls
64 lines (56 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# CI workflow for the main line (JDK 17)
#
# Triggers:
# - push / pull_request on the main branch
# - manual workflow_dispatch
#
# Runs `mvn -B clean verify` which includes the JaCoCo coverage gate
# (90% line coverage, haltOnFailure=false) configured in the POM.
#
# The POM uses modelVersion 4.1.0, which requires Maven 4; the runner's
# default mvn is Maven 3.x, so install Maven 4 first.
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
build:
name: JDK 17 Build & Verify
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout source
uses: actions/checkout@v7
- name: Set up JDK 17
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: '17'
cache: maven
- name: Install Maven 4
run: |
curl -fsSL https://archive.apache.org/dist/maven/maven-4/4.0.0-rc-4/binaries/apache-maven-4.0.0-rc-4-bin.tar.gz -o /tmp/apache-maven-4-bin.tar.gz
mkdir -p "$HOME/apache-maven-4"
tar -xzf /tmp/apache-maven-4-bin.tar.gz -C "$HOME/apache-maven-4" --strip-components=1
echo "$HOME/apache-maven-4/bin" >> "$GITHUB_PATH"
- name: Build and verify with JaCoCo coverage gate
run: mvn -B --no-transfer-progress clean verify
- name: Upload JaCoCo coverage report
if: always()
uses: actions/upload-artifact@v7
with:
name: jacoco-coverage
path: target/site/jacoco
retention-days: 14
- name: Upload surefire reports
if: always()
uses: actions/upload-artifact@v7
with:
name: surefire-reports
path: target/surefire-reports
retention-days: 14