-
Notifications
You must be signed in to change notification settings - Fork 10
95 lines (84 loc) · 2.22 KB
/
build.yml
File metadata and controls
95 lines (84 loc) · 2.22 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Build
on:
pull_request:
branches:
- main
- v*
push:
branches:
- main
- v*
workflow_call: {}
workflow_dispatch: {}
jobs:
build:
name: Build on JDK ${{ matrix.java-version }} (${{ matrix.os-name }})
runs-on: ${{ matrix.os-name }}
strategy:
fail-fast: false
matrix:
os-name: [ubuntu-latest]
java-version:
- 17 # LTS
- 21 # LTS
- 25 # LTS
include:
- os-name: windows-11-arm
java-version: 23 # Latest Temurin for ARM
- os-name: macos-latest
java-version: 25 # LTS
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 2
- name: Initialize JDK
uses: actions/setup-java@v5
with:
check-latest: true
distribution: temurin
java-version: ${{ matrix.java-version }}
- name: Maven cache
uses: actions/cache@v4
env:
cache-name: maven-cache
with:
path:
~/.m2
key: build-${{ env.cache-name }}
- name: Compile and run tests
shell: bash
run: ./mvnw -B -U clean verify
- name: Upload to codecov
uses: codecov/codecov-action@v5
with:
name: tests-java-${{ matrix.java-version }}-os-${{ matrix.os-name }}
token: ${{ secrets.CODECOV_TOKEN }}
- name: Stash reports
uses: actions/upload-artifact@v6
if: always()
with:
name: reports-${{ matrix.java-version }}-${{ matrix.os-name }}
if-no-files-found: error
path: |
**/surefire-reports/**
**/failsafe-reports/**
**/build*.log
retention-days: 30
notify-coverage:
name: Notify of coverage
runs-on: ubuntu-latest
timeout-minutes: 30
needs:
- build
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Publish code coverage
uses: codecov/codecov-action@v5
continue-on-error: true
if: always()
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
run_command: send-notifications