Skip to content

Commit 5f7aca8

Browse files
author
Travis Tomsu
authored
tests(reporting): Generate aggregate test report for easier browsing (#117)
1 parent 7f0e57f commit 5f7aca8

File tree

2 files changed

+27
-3
lines changed

2 files changed

+27
-3
lines changed

.github/workflows/buildAndTest.yaml

+25-2
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,18 @@ jobs:
2525
java: [8, 11, 15]
2626
steps:
2727
- uses: actions/checkout@v2
28+
2829
- uses: actions/setup-java@v1
2930
with:
3031
java-version: ${{ matrix.java }}
32+
3133
- uses: actions/cache@v2
3234
with:
3335
path: ~/.m2/repository
3436
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
3537
restore-keys: |
3638
${{ runner.os }}-maven-
39+
3740
- name: Mvn install # Need this when the directory/pom structure changes
3841
run: |
3942
./mvnw \
@@ -51,13 +54,23 @@ jobs:
5154
--fail-at-end \
5255
--threads 1.5C \
5356
test
57+
58+
- name: Aggregate Report
59+
run: |
60+
./mvnw \
61+
--batch-mode \
62+
--define aggregate=true \
63+
surefire-report:report-only
64+
5465
- name: Archive logs
5566
if: always()
5667
continue-on-error: true
5768
uses: actions/upload-artifact@v2
5869
with:
5970
name: Unit Test Logs - Java ${{ matrix.java }}
60-
path: "**/target/surefire-reports/*"
71+
path: |
72+
**/target/surefire-reports/*
73+
**/target/site
6174
6275
6376
integrationTests:
@@ -134,13 +147,23 @@ jobs:
134147
--define skip.surefire.tests=true \
135148
--define it.${{ matrix.it }}=true \
136149
verify
150+
151+
- name: Aggregate Report
152+
run: |
153+
./mvnw \
154+
--batch-mode \
155+
--define aggregate=true \
156+
surefire-report:failsafe-report-only
157+
137158
- name: Archive logs
138159
if: always()
139160
continue-on-error: true
140161
uses: actions/upload-artifact@v2
141162
with:
142163
name: Integration Test Logs - ${{ matrix.it}}
143-
path: "**/target/failsafe-reports/*"
164+
path: |
165+
**/target/failsafe-reports/*
166+
**/target/site
144167
145168
146169
releaseCheck:

spring-cloud-gcp-samples/spring-cloud-gcp-vision-ocr-demo/src/test/java/VisionOcrSampleIntegrationTest.java renamed to spring-cloud-gcp-samples/spring-cloud-gcp-vision-ocr-demo/src/test/java/com/example/VisionOcrSampleIntegrationTest.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
* limitations under the License.
1515
*/
1616

17-
import com.example.Application;
17+
package com.example;
18+
1819
import org.junit.BeforeClass;
1920
import org.junit.Test;
2021
import org.junit.runner.RunWith;

0 commit comments

Comments
 (0)