From 60f68206d99974035ecfba13d044e8516a2637b3 Mon Sep 17 00:00:00 2001 From: Azul Date: Fri, 26 Aug 2016 17:02:13 +0200 Subject: [test] initial .gitlab-ci.yml file Mostly copied from the webapp just to see how it goes. I did not carry over version restrictions from the .travis.yml file. I hope these limitations have vanished now and i can also remove them on travis. --- .gitlab-ci.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..c2c930c --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,27 @@ +# This file is a template, and might need editing before it works on your project. +# Official language image. Look for the different tagged releases at: +# https://hub.docker.com/r/library/ruby/tags/ +image: "ruby:2.1" + +# Pick zero or more services to be used on all builds. +# Only needed when using a docker container to run your tests in. +# Check out: http://docs.gitlab.com/ce/ci/docker/using_docker_images.html#what-is-service +services: + - couchdb:1.6.1 + +# Cache gems in between builds +cache: + paths: + - vendor/ + +# This is a basic example for a gem or script which doesn't use +# services such as redis or postgres +before_script: + - ruby -v + - curl -s couchdb:5984 + - gem install bundler --no-ri --no-rdoc + - bundle install -j $(nproc) --path vendor + +test: + script: + - bundle exec rake test -- cgit v1.2.3 From 85aff3a58343199b912da0eed9200976e1eacb17 Mon Sep 17 00:00:00 2001 From: Azul Date: Fri, 26 Aug 2016 17:47:16 +0200 Subject: [update] trying to silence warnings These warnings were showing on gitlab ci. $ bundle exec rake test /usr/local/bin/ruby -w -Ilib:test -I/builds/leap/nickserver/vendor/ruby/2.1.0/gems/rake-11.2.2/lib /builds/leap/nickserver/vendor/ruby/2.1.0/gems/rake-11.2.2/lib/rake/rake_test_loader.rb test/**/*_test.rb /usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.12.5/lib/bundler/rubygems_integration.rb:468: warning: method redefined; discarding old find_spec_for_exe /usr/local/lib/ruby/site_ruby/2.1.0/rubygems.rb:261: warning: previous definition of find_spec_for_exe was here I, [2016-08-26T15:34:46.162843 #325] INFO -- : Celluloid 0.17.3 is running in BACKPORTED mode. [ http://git.io/vJf3J ] /builds/leap/nickserver/test/unit/request_handler_test.rb:28: warning: mismatched indentations at 'end' with 'def' at 21 /builds/leap/nickserver/vendor/ruby/2.1.0/gems/celluloid-io-0.17.3/lib/celluloid/io/ssl_socket.rb:22: warning: instance variable @npn_protocols not initialized /builds/leap/nickserver/vendor/ruby/2.1.0/gems/celluloid-io-0.17.3/lib/celluloid/io/ssl_socket.rb:22: warning: instance variable @npn_select_cb not initialized Run options: --seed 61653 # Running: .................../builds/leap/nickserver/vendor/ruby/2.1.0/gems/celluloid-io-0.17.3/lib/celluloid/io/ssl_socket.rb:22: warning: instance variable @npn_protocols not initialized /builds/leap/nickserver/vendor/ruby/2.1.0/gems/celluloid-io-0.17.3/lib/celluloid/io/ssl_socket.rb:22: warning: instance variable @npn_select_cb not initialized .../builds/leap/nickserver/vendor/ruby/2.1.0/gems/celluloid-io-0.17.3/lib/celluloid/io/ssl_socket.rb:22: warning: instance variable @npn_protocols not initialized /builds/leap/nickserver/vendor/ruby/2.1.0/gems/celluloid-io-0.17.3/lib/celluloid/io/ssl_socket.rb:22: warning: instance variable @npn_select_cb not initialized ................. Finished in 2.029982s, 19.2120 runs/s, 10.8375 assertions/s. --- lib/nickserver/adapters/celluloid_http.rb | 4 +++- test/unit/request_handler_test.rb | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/nickserver/adapters/celluloid_http.rb b/lib/nickserver/adapters/celluloid_http.rb index d326b8a..44b6fe8 100644 --- a/lib/nickserver/adapters/celluloid_http.rb +++ b/lib/nickserver/adapters/celluloid_http.rb @@ -6,7 +6,9 @@ require 'http' module Nickserver::Adapters class CelluloidHttp - include Celluloid::IO + silence_warnings do + include Celluloid::IO + end def get(url, options = {}) response = HTTP.get url, diff --git a/test/unit/request_handler_test.rb b/test/unit/request_handler_test.rb index 420e74b..6c7a036 100644 --- a/test/unit/request_handler_test.rb +++ b/test/unit/request_handler_test.rb @@ -25,7 +25,7 @@ class Nickserver::RequestHandlerTest < Minitest::Test Nickserver::Hkp::Source.stub :new, source do assert_response status: 200, content: "200 fake content" end - end + end def test_fingerprint_to_short handle fingerprint: ['44F2F455E28'] -- cgit v1.2.3 From 4c4bcebd0d55800871e2c93dff849a0daf649b85 Mon Sep 17 00:00:00 2001 From: Azul Date: Fri, 26 Aug 2016 17:52:54 +0200 Subject: [upgrade] ruby 2.3 on CI --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c2c930c..14e56a7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,7 @@ # This file is a template, and might need editing before it works on your project. # Official language image. Look for the different tagged releases at: # https://hub.docker.com/r/library/ruby/tags/ -image: "ruby:2.1" +image: "ruby:2.3" # Pick zero or more services to be used on all builds. # Only needed when using a docker container to run your tests in. -- cgit v1.2.3