-
Notifications
You must be signed in to change notification settings - Fork 2
61 lines (54 loc) · 1.5 KB
/
test.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
49
50
51
52
53
54
55
56
57
58
59
60
61
name: "Test"
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
jobs:
test:
name: "Test"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java: [ 8, 11, 17, 21 ]
maven: [
3.9.8,
3.8.8,
3.6.3,
3.5.4,
3.3.9,
3.2.5,
3.1.1,
3.0.5,
# not support 2.x
#2.2.1,
#2.1.0,
#2.0.11
]
steps:
# step 1
- name: "Checkout"
uses: actions/[email protected]
# step 2
- name: "Setup Java JDK"
uses: actions/[email protected]
with:
distribution: 'zulu'
java-version: ${{ matrix.java }}
# step 3
- name: "Print maven version"
run: |
mvn -version
# step 4
- name: "Run Test With Maven"
run: |
if [ "${{ matrix.java }}" == "8" ]; then
mvn clean test -Pcicd8 -Dmaven.version=${{ matrix.maven }} -e -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn;
else
mvn clean test -Pcicd -Dmaven.version=${{ matrix.maven }} -e -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn;
fi
# step 5
- name: "Codecov"
if: matrix.java == '8' && matrix.maven == '3.0.5' && (github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master')
uses: codecov/[email protected]