From 1c802d0bed83dc259906b1d6947933acf0a6ae75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=B6r=C3=B0ur=20Freyr=20Yngvason?= Date: Sat, 1 Apr 2017 18:23:43 +0200 Subject: [PATCH 1/2] Add xlsx-validator to travis build matrix --- .dockerignore | 4 ++++ .gitignore | 3 ++- .travis.yml | 3 +++ ci/Dockerfile | 13 +++++++++++++ ci/validate-xlsx-files.sh | 4 ++++ 5 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 .dockerignore create mode 100644 ci/Dockerfile create mode 100755 ci/validate-xlsx-files.sh diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..b30a08ad --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +.git +.bundle +vendor +ci/Dockerfile diff --git a/.gitignore b/.gitignore index 95ae026c..c28cba18 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ unzip coverage .yardoc coverage.data +vendor *.gem *.xlsx example.csv @@ -18,4 +19,4 @@ examples/sprk2012 .~lock* *.qcachegrind *.iml -.idea \ No newline at end of file +.idea diff --git a/.travis.yml b/.travis.yml index 75643824..0e05ebf4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,6 +25,9 @@ matrix: - rvm: ruby-head - rvm: jruby-head env: JRUBY_OPTS="-Xcli.debug=true --debug" + - services: docker + before_install: docker build . -f ci/Dockerfile -t axlsx + script: docker run axlsx ci/validate-xlsx-files.sh allow_failures: - rvm: rbx-3 - rvm: ruby-head diff --git a/ci/Dockerfile b/ci/Dockerfile new file mode 100644 index 00000000..4f494fef --- /dev/null +++ b/ci/Dockerfile @@ -0,0 +1,13 @@ +# vim: set ft=Dockerfile + +FROM vindvaki/xlsx-validator + +RUN apt-get install -y build-essential ruby ruby-dev libxslt-dev libxml2-dev zlib1g-dev +RUN gem install bundler +ADD Gemfile* axlsx.gemspec /app/axlsx/ +WORKDIR /app/axlsx/ +ADD lib/axlsx/version.rb lib/axlsx/version.rb +RUN bundle install +ADD . . + +ADD ci/validate-xlsx-files.sh . diff --git a/ci/validate-xlsx-files.sh b/ci/validate-xlsx-files.sh new file mode 100755 index 00000000..e68e2120 --- /dev/null +++ b/ci/validate-xlsx-files.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +bundle exec ruby examples/example.rb +xlsx-validator *.xlsx From afc215fd0a6e06566b3beda76d84446c7c090760 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=B6r=C3=B0ur=20Freyr=20Yngvason?= Date: Tue, 9 May 2017 19:53:34 +0200 Subject: [PATCH 2/2] Allow validator failures --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 0e05ebf4..919e8d41 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,6 +33,7 @@ matrix: - rvm: ruby-head - rvm: jruby-9.1.8.0 - rvm: jruby-head + - services: docker # https://github.com/jruby/jruby/wiki/FAQs#why-is-jruby-so-slow-to-install-via-rvm # https://docs.travis-ci.com/user/installing-dependencies#Installing-Packages-with-the-APT-Addon