35
35
services :
36
36
- mysql
37
37
38
+
39
+
38
40
before_install :
39
41
- cat /etc/hosts
40
42
@@ -57,52 +59,55 @@ before_script:
57
59
- cd ${NGX_SRC} && ./configure --with-http_v2_module --with-select_module --with-http_ssl_module --with-ipv6 --with-http_geoip_module --with-http_auth_request_module --with-debug --add-module=${NC_PJ_HOME}/src/c --with-http_stub_status_module --prefix= --sbin-path=nginx --conf-path=conf/nginx.conf --error-log-path=logs/error.log --http-log-path=logs/access.log --pid-path=logs/nginx.pid --lock-path=logs/nginx.lock --http-client-body-temp-path=temp/client_temp --http-proxy-temp-path=temp/proxy_temp --http-fastcgi-temp-path=temp/fastcgi_temp --http-uwsgi-temp-path=temp/uwsgi_temp --http-scgi-temp-path=temp/scgi_temp
58
60
- make
59
61
- cp objs/nginx ${NC_PJ_HOME}/test/nginx-working-dir
60
-
61
- script :
62
+ - cd /home/who/git/nginx-clojure/test/nginx-working-dir
63
+ - mkdir logs temp temp/client_temp temp/fastcgi_temp temp/proxy_temp temp/scgi_temp temp/uwsgi_temp
62
64
- cd /home/who/git/nginx-clojure/
63
65
- mkdir bin
64
- - lein with-profile +cljremotetest classpath
66
+ - lein with-profile +cljremotetest classpath
65
67
- lein install
66
- - echo "******************************* Start Junit Test**********************************"
67
- - lein with-profile unittest junit
68
- - echo "******************************* Start Intergration Test (Plain Mode ) ************"
69
- - cd /home/who/git/nginx-clojure/test/nginx-working-dir
70
- - mkdir logs temp temp/client_temp temp/fastcgi_temp temp/proxy_temp temp/scgi_temp temp/uwsgi_temp
71
- - ./nginx -c /home/who/git/nginx-clojure/test/nginx-working-dir/conf/nginx-plain.conf &
72
- # - sudo iptables -A INPUT -p tcp --dport 8080 -j ACCEPT
73
- # - sudo iptables -A INPUT -p tcp --dport 8081 -j ACCEPT
74
- # - sudo iptables -A INPUT -p tcp --dport 8082 -j ACCEPT
75
- # - sudo iptables -A INPUT -p tcp --dport 8181 -j ACCEPT
76
- # - sudo iptables -A INPUT -p tcp --dport 8999 -j ACCEPT
77
- # - sudo iptables --list
78
- # - tail -f logs/error.log
79
- - sleep 10
80
- - tail logs/error.log
81
- - curl -v http://localhost:8080/clojure
82
- - cd /home/who/git/nginx-clojure/
83
- - lein with-profile cljremotetest test :all
84
- - cd /home/who/git/nginx-clojure/test/nginx-working-dir
85
- - ./nginx -c /home/who/git/nginx-clojure/test/nginx-working-dir/conf/nginx-plain.conf -s stop
86
- - sleep 10
87
- - echo "******************************* Start Intergration Test (Thread Pool Mode ) ************"
88
- - ./nginx -c /home/who/git/nginx-clojure/test/nginx-working-dir/conf/nginx-threadpool.conf &
89
- - sleep 10
90
- - tail logs/error.log
91
- - curl -v http://localhost:8080/clojure
92
- - cd /home/who/git/nginx-clojure/
93
- - lein with-profile cljremotetest test :no-async
94
- - cd /home/who/git/nginx-clojure/test/nginx-working-dir
95
- - ./nginx -c /home/who/git/nginx-clojure/test/nginx-working-dir/conf/nginx-threadpool.conf -s stop
96
- - sleep 10
97
- - echo "******************************* Start Intergration Test (Coroutine Mode ) ************"
98
- - ./nginx -c /home/who/git/nginx-clojure/test/nginx-working-dir/conf/nginx-coroutine.conf &
99
- - sleep 30
100
- - tail logs/error.log
101
- - curl -v http://localhost:8080/clojure
102
- - cd /home/who/git/nginx-clojure/
103
- - lein with-profile cljremotetest test :all
104
- - cd /home/who/git/nginx-clojure/test/nginx-working-dir
105
- - ./nginx -c /home/who/git/nginx-clojure/test/nginx-working-dir/conf/nginx-coroutine.conf -s stop
68
+ - lein with-profile unittest junit compile
69
+
70
+ jobs :
71
+ include :
72
+ - stage : unit test
73
+ script :
74
+ - lein with-profile unittest junit
75
+ - stage : integration test
76
+ script :
77
+ - cd /home/who/git/nginx-clojure/test/nginx-working-dir
78
+ - ./nginx -c /home/who/git/nginx-clojure/test/nginx-working-dir/conf/nginx-plain.conf &
79
+ - sleep 10
80
+ - tail -f logs/error.log &
81
+ - curl -v http://localhost:8080/clojure
82
+ - killall tail
83
+ - cd /home/who/git/nginx-clojure/
84
+ - lein with-profile cljremotetest test :all
85
+ - cd /home/who/git/nginx-clojure/test/nginx-working-dir
86
+ - ./nginx -c /home/who/git/nginx-clojure/test/nginx-working-dir/conf/nginx-plain.conf -s stop
87
+ - # stage name not required, will continue to use `integration test`
88
+ script :
89
+ - cd /home/who/git/nginx-clojure/test/nginx-working-dir
90
+ - ./nginx -c /home/who/git/nginx-clojure/test/nginx-working-dir/conf/nginx-threadpool.conf &
91
+ - sleep 10
92
+ - tail -f logs/error.log &
93
+ - curl -v http://localhost:8080/clojure
94
+ - killall tail
95
+ - cd /home/who/git/nginx-clojure/
96
+ - lein with-profile cljremotetest test :no-async
97
+ - cd /home/who/git/nginx-clojure/test/nginx-working-dir
98
+ - ./nginx -c /home/who/git/nginx-clojure/test/nginx-working-dir/conf/nginx-threadpool.conf -s stop
99
+ - # stage name not required, will continue to use `integration test`
100
+ script :
101
+ - cd /home/who/git/nginx-clojure/test/nginx-working-dir
102
+ - ./nginx -c /home/who/git/nginx-clojure/test/nginx-working-dir/conf/nginx-coroutine.conf &
103
+ - sleep 30
104
+ - tail -f logs/error.log &
105
+ - curl -v http://localhost:8080/clojure
106
+ - killall tail
107
+ - cd /home/who/git/nginx-clojure/
108
+ - lein with-profile cljremotetest test :all
109
+ - cd /home/who/git/nginx-clojure/test/nginx-working-dir
110
+ - ./nginx -c /home/who/git/nginx-clojure/test/nginx-working-dir/conf/nginx-coroutine.conf -s stop
106
111
107
112
after_failure :
108
113
- echo "******************************** Test Failed (Start of Nginx error.log)*****************"
@@ -111,3 +116,8 @@ after_failure:
111
116
112
117
notifications :
113
118
email : false
119
+
120
+ branches :
121
+ only :
122
+ - master
123
+ - stable
0 commit comments