Skip to content

Commit 32cd6aa

Browse files
committed
check-build-and-verify.sh: split unit and integration tests.
Fix #374 No functional changes.
1 parent caee94e commit 32cd6aa

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
<java.version>1.8</java.version>
8787
<start-class>ru.mystamps.web.support.spring.boot.ApplicationBootstrap</start-class>
8888

89+
<skipUnitTests>false</skipUnitTests>
8990
</properties>
9091

9192
<dependencies>
@@ -602,6 +603,7 @@
602603
<artifactId>maven-surefire-plugin</artifactId>
603604
<version>${surefire.plugin.version}</version>
604605
<configuration>
606+
<skipTests>${skipUnitTests}</skipTests>
605607
<!-- Run junit tests only (see #SUREFIRE-377) -->
606608
<testNGArtifactName>none:none</testNGArtifactName>
607609
</configuration>

src/main/scripts/ci/check-build-and-verify.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ if [ "$RUN_ONLY_INTEGRATION_TESTS" = 'no' ]; then
2323
'An "img" element must have an "alt" attribute' \
2424
--show-warnings \
2525
>validator.log 2>&1 || touch HTML_FAIL
26+
mvn --batch-mode test -Denforcer.skip=true -DskipMinify=true >test.log 2>&1 || touch TEST_FAIL
2627
fi
2728

28-
mvn --batch-mode verify >verify.log 2>&1 || touch VERIFY_FAIL
29+
mvn --batch-mode verify -Denforcer.skip=true -DskipUnitTests=true >verify.log 2>&1 || touch VERIFY_FAIL
2930

3031
echo
3132
echo 'Build summary:'
@@ -38,9 +39,10 @@ if [ "$RUN_ONLY_INTEGRATION_TESTS" = 'no' ]; then
3839
print_status BOOTLINT_FAIL 'Run bootlint'
3940
print_status JASMINE_FAIL 'Run JavaScript unit tests'
4041
print_status HTML_FAIL 'Run html5validator'
42+
print_status TEST_FAIL 'Run unit tests'
4143
fi
4244

43-
print_status VERIFY_FAIL 'Compile and run unit/integration tests'
45+
print_status VERIFY_FAIL 'Run integration tests'
4446

4547
echo
4648

@@ -51,13 +53,14 @@ if [ "$RUN_ONLY_INTEGRATION_TESTS" = 'no' ]; then
5153
print_log bootlint.log 'Run bootlint'
5254
print_log jasmine.log 'Run JavaScript unit tests'
5355
print_log validator.log 'Run html5validator'
56+
print_log test.log 'Run unit tests'
5457
fi
5558

56-
print_log verify.log 'Compile and run unit/integration tests'
59+
print_log verify.log 'Run integration tests'
5760

58-
rm -f cs.log pmd.log license.log bootlint.log jasmine.log validator.log verify.log
61+
rm -f cs.log pmd.log license.log bootlint.log jasmine.log validator.log test.log verify.log
5962

6063
if [ -n "$(ls *_FAIL 2>/dev/null)" ]; then
61-
rm -f CS_FAIL PMD_FAIL LICENSE_FAIL BOOTLINT_FAIL JASMINE_FAIL HTML_FAIL VERIFY_FAIL
64+
rm -f CS_FAIL PMD_FAIL LICENSE_FAIL BOOTLINT_FAIL JASMINE_FAIL HTML_FAIL TEST_FAIL VERIFY_FAIL
6265
exit 1
6366
fi

0 commit comments

Comments
 (0)