diff --git a/.travis.yml b/.travis.yml index f6e78f1a..8e81eaa3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,6 +35,8 @@ env: services: - mysql + + before_install: - cat /etc/hosts @@ -57,52 +59,55 @@ before_script: - 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 - make - cp objs/nginx ${NC_PJ_HOME}/test/nginx-working-dir - -script: + - cd /home/who/git/nginx-clojure/test/nginx-working-dir + - mkdir logs temp temp/client_temp temp/fastcgi_temp temp/proxy_temp temp/scgi_temp temp/uwsgi_temp - cd /home/who/git/nginx-clojure/ - mkdir bin - - lein with-profile +cljremotetest classpath + - lein with-profile +cljremotetest classpath - lein install - - echo "******************************* Start Junit Test**********************************" - - lein with-profile unittest junit - - echo "******************************* Start Intergration Test (Plain Mode ) ************" - - cd /home/who/git/nginx-clojure/test/nginx-working-dir - - mkdir logs temp temp/client_temp temp/fastcgi_temp temp/proxy_temp temp/scgi_temp temp/uwsgi_temp - - ./nginx -c /home/who/git/nginx-clojure/test/nginx-working-dir/conf/nginx-plain.conf & -# - sudo iptables -A INPUT -p tcp --dport 8080 -j ACCEPT -# - sudo iptables -A INPUT -p tcp --dport 8081 -j ACCEPT -# - sudo iptables -A INPUT -p tcp --dport 8082 -j ACCEPT -# - sudo iptables -A INPUT -p tcp --dport 8181 -j ACCEPT -# - sudo iptables -A INPUT -p tcp --dport 8999 -j ACCEPT -# - sudo iptables --list -# - tail -f logs/error.log - - sleep 10 - - tail logs/error.log - - curl -v http://localhost:8080/clojure - - cd /home/who/git/nginx-clojure/ - - lein with-profile cljremotetest test :all - - cd /home/who/git/nginx-clojure/test/nginx-working-dir - - ./nginx -c /home/who/git/nginx-clojure/test/nginx-working-dir/conf/nginx-plain.conf -s stop - - sleep 10 - - echo "******************************* Start Intergration Test (Thread Pool Mode ) ************" - - ./nginx -c /home/who/git/nginx-clojure/test/nginx-working-dir/conf/nginx-threadpool.conf & - - sleep 10 - - tail logs/error.log - - curl -v http://localhost:8080/clojure - - cd /home/who/git/nginx-clojure/ - - lein with-profile cljremotetest test :no-async - - cd /home/who/git/nginx-clojure/test/nginx-working-dir - - ./nginx -c /home/who/git/nginx-clojure/test/nginx-working-dir/conf/nginx-threadpool.conf -s stop - - sleep 10 - - echo "******************************* Start Intergration Test (Coroutine Mode ) ************" - - ./nginx -c /home/who/git/nginx-clojure/test/nginx-working-dir/conf/nginx-coroutine.conf & - - sleep 30 - - tail logs/error.log - - curl -v http://localhost:8080/clojure - - cd /home/who/git/nginx-clojure/ - - lein with-profile cljremotetest test :all - - cd /home/who/git/nginx-clojure/test/nginx-working-dir - - ./nginx -c /home/who/git/nginx-clojure/test/nginx-working-dir/conf/nginx-coroutine.conf -s stop + - lein with-profile unittest junit compile + +jobs: + include: + - stage: unit test + script: + - lein with-profile unittest junit + - stage: integration test + script: + - cd /home/who/git/nginx-clojure/test/nginx-working-dir + - ./nginx -c /home/who/git/nginx-clojure/test/nginx-working-dir/conf/nginx-plain.conf & + - sleep 10 + - tail -f logs/error.log & + - curl -v http://localhost:8080/clojure + - killall tail + - cd /home/who/git/nginx-clojure/ + - lein with-profile cljremotetest test :all + - cd /home/who/git/nginx-clojure/test/nginx-working-dir + - ./nginx -c /home/who/git/nginx-clojure/test/nginx-working-dir/conf/nginx-plain.conf -s stop + - # stage name not required, will continue to use `integration test` + script: + - cd /home/who/git/nginx-clojure/test/nginx-working-dir + - ./nginx -c /home/who/git/nginx-clojure/test/nginx-working-dir/conf/nginx-threadpool.conf & + - sleep 10 + - tail -f logs/error.log & + - curl -v http://localhost:8080/clojure + - killall tail + - cd /home/who/git/nginx-clojure/ + - lein with-profile cljremotetest test :no-async + - cd /home/who/git/nginx-clojure/test/nginx-working-dir + - ./nginx -c /home/who/git/nginx-clojure/test/nginx-working-dir/conf/nginx-threadpool.conf -s stop + - # stage name not required, will continue to use `integration test` + script: + - cd /home/who/git/nginx-clojure/test/nginx-working-dir + - ./nginx -c /home/who/git/nginx-clojure/test/nginx-working-dir/conf/nginx-coroutine.conf & + - sleep 30 + - tail -f logs/error.log & + - curl -v http://localhost:8080/clojure + - killall tail + - cd /home/who/git/nginx-clojure/ + - lein with-profile cljremotetest test :all + - cd /home/who/git/nginx-clojure/test/nginx-working-dir + - ./nginx -c /home/who/git/nginx-clojure/test/nginx-working-dir/conf/nginx-coroutine.conf -s stop after_failure: - echo "******************************** Test Failed (Start of Nginx error.log)*****************" @@ -111,3 +116,8 @@ after_failure: notifications: email: false + +branches: + only: + - master + - stable diff --git a/nginx-clojure-embed/.gitignore b/nginx-clojure-embed/.gitignore index 0d5f2eb0..fa39278e 100644 --- a/nginx-clojure-embed/.gitignore +++ b/nginx-clojure-embed/.gitignore @@ -11,3 +11,4 @@ /res /ngx-memoryleak /.lein-failures +/pom.xml.asc