-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (48 loc) · 1.43 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
name: "Test"
on:
push:
branches: [ master, spring-boot_* ]
pull_request:
branches: [ master ]
jobs:
test:
name: "Test"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java: [ 8, 11, 17 ]
springboot: [
2.7.1,
2.6.9,
2.5.14,
2.4.13,
2.3.12.RELEASE,
2.2.13.RELEASE,
2.1.18.RELEASE,
#2.0.9.RELEASE,
#1.5.22.RELEASE,
#1.4.7.RELEASE,
#1.3.8.RELEASE,
#1.2.8.RELEASE,
#1.1.12.RELEASE,
#1.0.2.RELEASE
]
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: "Run Test With Maven"
# https://docs.github.com/cn/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#github-context
run: mvn clean test -e -B -Pcicd -Dspring-boot.version=${{ matrix.springboot }} -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn;
# step 4
- name: "Codecov"
if: matrix.java == '8' && matrix.springboot == '2.7.1' && (github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master')
uses: codecov/[email protected]