Skip to content

Commit be0a9eb

Browse files
committed
Update CI
1 parent a98ff80 commit be0a9eb

File tree

1 file changed

+36
-3
lines changed

1 file changed

+36
-3
lines changed

.github/workflows/ci.yml

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,38 @@ jobs:
1212
runs-on: ubuntu-latest
1313
timeout-minutes: 30
1414

15+
steps:
16+
- uses: actions/checkout@v2
17+
18+
- name: Set up JDK 8
19+
uses: actions/setup-java@v2
20+
with:
21+
distribution: zulu
22+
java-version: 8
23+
cache: maven
24+
25+
- name: Grant execute permission for mvnw
26+
run: chmod +x mvnw
27+
28+
- name: Test with Maven
29+
run: ./mvnw test -B
30+
31+
- name: Upload reports
32+
if: failure()
33+
uses: actions/upload-artifact@v2
34+
with:
35+
name: reports
36+
path: ./**/target/surefire-reports
37+
38+
test-matrix:
39+
if: contains(github.event.head_commit.message, '[skip ci]') == false
40+
runs-on: ubuntu-latest
41+
timeout-minutes: 30
42+
needs: [ test ]
43+
1544
strategy:
1645
matrix:
17-
java: [ 8, 11, 17 ]
46+
java: [ 11, 17 ]
1847
spring-boot-version: [ 2.2.13.RELEASE, 2.3.12.RELEASE, 2.4.12, 2.5.6 ]
1948

2049
steps:
@@ -44,6 +73,7 @@ jobs:
4473
if: contains(github.event.head_commit.message, '[skip ci]') == false
4574
runs-on: ubuntu-latest
4675
timeout-minutes: 30
76+
needs: [ test ]
4777

4878
steps:
4979
- uses: actions/checkout@v2
@@ -59,7 +89,9 @@ jobs:
5989
run: chmod +x mvnw
6090

6191
- name: Copy module-info.java
62-
run: cp doma-spring-boot-core/src/module/java/module-info.java doma-spring-boot-core/src/main/java/ && cp doma-spring-boot-autoconfigure/src/module/java/module-info.java doma-spring-boot-autoconfigure/src/main/java/
92+
run: |
93+
cp doma-spring-boot-core/src/module/java/module-info.java doma-spring-boot-core/src/main/java/ && \\
94+
cp doma-spring-boot-autoconfigure/src/module/java/module-info.java doma-spring-boot-autoconfigure/src/main/java/
6395
6496
- name: Test with Maven
6597
run: ./mvnw test -B -pl doma-spring-boot-core,doma-spring-boot-autoconfigure -Dmaven.compiler.source=11 -Dmaven.compiler.target=11
@@ -75,6 +107,7 @@ jobs:
75107
if: contains(github.event.head_commit.message, '[skip ci]') == false
76108
runs-on: ubuntu-latest
77109
timeout-minutes: 30
110+
needs: [ test ]
78111

79112
steps:
80113
- uses: actions/checkout@v2
@@ -102,7 +135,7 @@ jobs:
102135
deploy:
103136
if: github.event_name == 'push' && contains(github.event.head_commit.message, '[skip ci]') == false
104137
runs-on: ubuntu-latest
105-
needs: [ test, test-module, test-slf4j-backward-compatible ]
138+
needs: [ test-matrix, test-module, test-slf4j-backward-compatible ]
106139

107140
steps:
108141
- uses: actions/checkout@v2

0 commit comments

Comments
 (0)