@@ -8,32 +8,59 @@ services:
8
8
jdk :
9
9
- oraclejdk8
10
10
11
+ # Run before every job
11
12
before_install :
12
13
- uname -a
13
14
- chmod +x pom.xml
14
15
15
- script :
16
- # since we run parallel tests using embedded mongodb in fresh environment all tests run first in parallel
17
- # will try to download the embedded mongo to this travis instance but the late ones will fail to write.
18
- # We will therefore run one test using mongodb first that will download the mongo instance and
19
- # then the rest of the test that will no longer need to download the embedded mongo since it will exist.
20
- #
21
- # It is also important that the first test to be run is a Spring Boot Test since spring boot also downloads
22
- # another version of embedded mongo db so all Spring Boot tests will end up in a race condition also
23
- - source docker-env.bash
24
- - docker-compose up -d
25
- - mvn -DsomeModule.test.includes="**/QueryServiceTest.java" test -DskipITs -B
26
- - mvn -DsomeModule.test.excludes="**/QueryServiceTest.java" test -DskipITs -B
27
- - mvn verify -DskipUTs -Der.url=http://localhost:8084/search/ -Drabbitmq.exchange.name=ei-exchange -Dspring.mail.host=localhost -Dspring.mail.port=1025 -Dwaitlist.fixedRateResend=1 -B
28
16
17
+ # This is only run before integrationTests job
18
+ # To ensure docker containers are fully up and running we sleep 20s
19
+ before_script :
20
+ - source docker-env.bash
21
+ - docker-compose up -d
22
+ - sleep 20
23
+
24
+
25
+ # Generate site documentation using mvn site plugin
29
26
before_deploy :
30
27
- rm -rf docs
31
28
- mvn site -B
32
29
33
- deploy :
34
- skip_cleanup : true
35
- provider : pages
36
- github-token : $GITHUB_TOKEN
37
- local_dir : docs/
38
- on :
39
- branch : master
30
+
31
+ # Using default stage 'test' for all our test jobs, and only running deploy stage
32
+ # (after merge) to master branch
33
+ stages :
34
+ - test
35
+ - name : deploy
36
+ if : branch = master
37
+
38
+
39
+ # List of jobs to run, tied to specific stages
40
+ jobs :
41
+ include :
42
+ - stage : test
43
+ name : functionalTests
44
+ before_script : skip
45
+ script :
46
+ # We will run one test using embedded mongodb first that will download the mongo instance and
47
+ # then the rest of the test that will no longer need to download the embedded mongo since it will exist.
48
+ #
49
+ # Also important that the first test to be run is a Spring Boot Test since spring boot also downloads
50
+ # another version of embedded mongo db to avoid race conditions between Spring Boot tests
51
+ - mvn -DsomeModule.test.includes="**/QueryServiceTest.java" test -DskipITs -B
52
+ - mvn -DsomeModule.test.excludes="**/QueryServiceTest.java" test -DskipITs -B
53
+ - stage : test
54
+ name : integrationTests
55
+ script :
56
+ - mvn verify -DskipUTs -Der.url=http://localhost:8084/search/ -Drabbitmq.exchange.name=ei-exchange -Dspring.mail.host=localhost -Dspring.mail.port=1025 -Dwaitlist.fixedRateResend=1 -B
57
+ - stage : deploy
58
+ name : deployGitHubPages
59
+ before_script : skip # do not run this on deploy
60
+ script : skip # do not run default test scripts
61
+ install : skip # do not run default mvn install
62
+ deploy :
63
+ provider : pages
64
+ skip_cleanup : true
65
+ github-token : $GITHUB_TOKEN
66
+ local_dir : docs/
0 commit comments