[milter-manager-commit] milter-manager/milter-manager at 88f6869 [docker-for-ci] travis: Use docker-compose to run test

Back to archive index

Kenji Okimoto null+****@clear*****
Wed Apr 5 15:55:42 JST 2017


Kenji Okimoto	2017-04-05 15:55:42 +0900 (Wed, 05 Apr 2017)

  New Revision: 88f686917bc6f132814895095ea28da121536c00
  https://github.com/milter-manager/milter-manager/commit/88f686917bc6f132814895095ea28da121536c00

  Message:
    travis: Use docker-compose to run test

  Added files:
    docker-compose.yml
    dockerfiles/Docker-file-ubuntu-xenial
    dockerfiles/Dockerfile-ubuntu-trusty
  Modified files:
    .travis.yml

  Modified: .travis.yml (+28 -28)
===================================================================
--- .travis.yml    2017-04-05 15:20:20 +0900 (8f9c508)
+++ .travis.yml    2017-04-05 15:55:42 +0900 (300a0d1)
@@ -1,36 +1,36 @@
 dist: trusty
+sudo: required
 notifications:
   recipients:
     - travi****@clear*****
-rvm:
-  - 2.1
-  - 2.2
-  - 2.3.4
-  - 2.4.1
-# - ruby-head
+
+services:
+  - docker
+
 env:
-  - MILTER_EVENT_LOOP_BACKEND=glib
-#  - MILTER_EVENT_LOOP_BACKEND=libev
-# matrix:
-#   allow_failures:
-#     - rvm: 2.2
-#       env: MILTER_EVENT_LOOP_BACKEND=glib
-#     - rvm: ruby-head
-#       env: MILTER_EVENT_LOOP_BACKEND=glib
-install:
-  - curl https://raw.github.com/clear-code/cutter/master/data/travis/setup.sh | sh
-  - sudo apt-get update
-  - sudo apt-get install -y debhelper dh-systemd autotools-dev libglib2.0-dev libev-dev ruby ruby-dev ruby-gnome2-dev intltool cutter-testing-framework lcov
-  - gem install coveralls-lcov --version 1.1.0
-  - gem install pkg-config
-  - echo -e "\n::1 ip6-localhost" | sudo tee --append /etc/hosts
+  global:
+    DOCKER_COMPOSE_VERSION: 1.8.1
+  matrix:
+    - TARGET_DISTRIBUTION=ubuntu-trusty
+
+before_install:
+  - sudo rm /usr/local/bin/docker-compose
+  - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m) > docker-compose
+  - chmod +x docker-compose
+  - sudo mv docker-compose /usr/local/bin/
+
 before_script:
-  - ./autogen.sh
-  - ./configure --enable-coverage --with-default-connection-spec="inet:10025@[127.0.0.1]"
-  - make
+  - docker-compose build ${TARGET_DISTRIBUTION}
+  - docker-compose ps
+  - docker-compose up -d ${TARGET_DISTRIBUTION}
+  - docker-compose exec ${TARGET_DISTRIBUTION} ./autogen.sh
+  - docker-compose exec ${TARGET_DISTRIBUTION} ./configure --enable-coverage --with-default-connection-spec="inet:10025@[127.0.0.1]"
+  - docker-compose exec ${TARGET_DISTRIBUTION} make
+
 script:
-  - test/run-test.sh
-  - binding/ruby/test/run-test.sh
+  - docker-compose exec ${TARGET_DISTRIBUTION} test/run-test.sh
+  - docker-compose exec ${TARGET_DISTRIBUTION} binding/ruby/test/run-test.sh
+
 after_success:
-  - lcov --compat-libtool --directory . --capture --output-file coverage.info
-  - coveralls-lcov -v coverage.info
+  - docker-compose exec ${TARGET_DISTRIBUTION} lcov --compat-libtool --directory . --capture --output-file coverage.info
+  - docker-compose exec ${TARGET_DISTRIBUTION} coveralls-lcov -v coverage.info

  Added: docker-compose.yml (+15 -0) 100644
===================================================================
--- /dev/null
+++ docker-compose.yml    2017-04-05 15:55:42 +0900 (e02ea02)
@@ -0,0 +1,15 @@
+version: "2"
+services:
+  ubuntu-trusty:
+    build:
+      context: .
+      dockerfile: dockerfiles/Dockerfile-ubuntu-trusty
+    command: tail -f /dev/null
+
+  ubuntu-xenial:
+    build:
+      context: .
+      dockerfile: dockerfiles/Dockerfile-ubuntu-xenial
+    command: tail -f /dev/null
+
+

  Added: dockerfiles/Docker-file-ubuntu-xenial (+10 -0) 100644
===================================================================
--- /dev/null
+++ dockerfiles/Docker-file-ubuntu-xenial    2017-04-05 15:55:42 +0900 (6f7f0f9)
@@ -0,0 +1,10 @@
+FROM: ubuntu:xenial
+
+RUN apt-get update && \
+    apt-get install -qq -y debhelper dh-systemd autotools-dev libglib2.0-dev libev-dev ruby ruby-dev ruby-gnome2-dev intltool cutter-testing-framework lcov && \
+    curl https://raw.github.com/clear-code/cutter/master/data/travis/setup.sh | sh && \
+    gem install coveralls-lcov && \
+    gem install pkg-config
+
+WORKDIR /app
+COPY . .

  Added: dockerfiles/Dockerfile-ubuntu-trusty (+10 -0) 100644
===================================================================
--- /dev/null
+++ dockerfiles/Dockerfile-ubuntu-trusty    2017-04-05 15:55:42 +0900 (06a0419)
@@ -0,0 +1,10 @@
+FROM: ubuntu:trusty
+
+RUN apt-get update && \
+    apt-get install -qq -y debhelper dh-systemd autotools-dev libglib2.0-dev libev-dev ruby ruby-dev ruby-gnome2-dev intltool cutter-testing-framework lcov && \
+    curl https://raw.github.com/clear-code/cutter/master/data/travis/setup.sh | sh && \
+    gem install coveralls-lcov && \
+    gem install pkg-config
+
+WORKDIR /app
+COPY . .
-------------- next part --------------
An HTML attachment was scrubbed...
Download 



More information about the milter-manager-commit mailing list
Back to archive index