Skip to content

Commit

Permalink
Use Docker at Travis (#485)
Browse files Browse the repository at this point in the history
* Use Docker at Travis

* Fix tests

* Use the new Docker image

* Update Travis comments

* Fixed Travis build
  • Loading branch information
lslezak committed Jan 11, 2017
1 parent f34c5dc commit d00adca
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
21 changes: 9 additions & 12 deletions .travis.yml
@@ -1,14 +1,11 @@
language: cpp
compiler:
- gcc
sudo: required
language: bash
services:
- docker

before_install:
# disable rvm, use system Ruby
- rvm reset
- wget https://raw.githubusercontent.com/yast/yast-devtools/master/travis-tools/travis_setup.sh
- sh ./travis_setup.sh -p "rake yast2-devtools yast2-testsuite yast2-core-dev yast2 yast2-network yast2-transfer yast2-users yast2-country" -g "rspec:3.3.0 yast-rake gettext rubocop:0.41.2 simplecov coveralls cheetah"
- docker build -t yast-installation-image .
script:
- rake check:syntax
- rake check:pot
- rubocop
- COVERAGE=1 rake test:unit
- sudo rake install
# the "yast-travis-ruby" script is included in the base yastdevel/ruby image
# see https://github.com/yast/docker-yast-ruby/blob/master/yast-travis-ruby
- docker run -it -e TRAVIS=1 -e TRAVIS_JOB_ID="$TRAVIS_JOB_ID" yast-installation-image yast-travis-ruby
3 changes: 3 additions & 0 deletions Dockerfile
@@ -0,0 +1,3 @@
FROM yastdevel/ruby
COPY . /usr/src/app

1 change: 1 addition & 0 deletions test/test_helper.rb
Expand Up @@ -23,6 +23,7 @@ def stub_module(name)
stub_module("Packages")
stub_module("InstURL")
stub_module("Language")
stub_module("Keyboard")
stub_module("AddOnProduct")
stub_module("ProductLicense")
stub_module("AutoinstGeneral")
Expand Down

0 comments on commit d00adca

Please sign in to comment.