-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (38 loc) · 1.19 KB
/
maven-build.yml
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
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Java CI with Maven
on:
push:
branches:
- release
schedule:
- cron: "0 20 * * 6" # Runs at 05:00 Asia/Seoul on Sun.
jobs:
build:
name: Builds with java ${{ matrix.java }} on ${{ matrix.os }}
strategy:
fail-fast: true
max-parallel: 3 # Maximum: Sum of matrices.
matrix:
java: [8, 11, 17] # LTS versions (always latest).
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources from repository
uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: zulu
cache: maven
- name: Build with Maven
run: |
mvn --version
mvn clean package -B --file pom.xml
- name: Send code coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
verbose: true