diff --git a/.travis.yml b/.travis.yml index 7b757a9b..37aa930c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,6 @@ -os: osx +os: + - osx + - linux language: ruby install: true @@ -11,7 +13,14 @@ gemfile: - gemfiles/Gemfile.xcodeproj-edge rvm: - 2.5.0 - - ruby-2.0.0-p648 + - 2.6.0 + - 2.7.0 + +matrix: + include: + - rvm: 2.7.0 + os: linux + env: XCAKE_CI_TASKS=LINT before_script: - gem install bundler -v "~> 1.17" diff --git a/spec/integration_spec.rb b/spec/integration_spec.rb index 9086a660..7578395d 100644 --- a/spec/integration_spec.rb +++ b/spec/integration_spec.rb @@ -1,6 +1,7 @@ require 'spec_helper' require 'yaml' require 'simplecov' +require 'os' SimpleCov.command_name 'test:integration' @@ -61,13 +62,17 @@ def self.list_files(directory) expect(Dir['temp/*.xcodeproj']).to eq(%w(temp/Project.xcodeproj)) end end - it 'Should build fixture with xcodebuild with no errors' do - Dir.chdir(fixture) do - Xcake.make_helper - Dir.chdir('temp') do - expect('xcodebuild clean build -sdk iphonesimulator &> xcode_output.txt').to succeed + + # this cannot be tested on any OS other than macOS + if OS.mac? + it 'Should build fixture with xcodebuild with no errors' do + Dir.chdir(fixture) do + Xcake.make_helper + Dir.chdir('temp') do + expect('xcodebuild clean build -sdk iphonesimulator &> xcode_output.txt').to succeed + end + expect(Xcake.list_files('temp')).to include(*Xcake.list_files('output')) end - expect(Xcake.list_files('temp')).to include(*Xcake.list_files('output')) end end end diff --git a/xcake.gemspec b/xcake.gemspec index 45fa4600..14969faa 100644 --- a/xcake.gemspec +++ b/xcake.gemspec @@ -31,12 +31,14 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength spec.add_dependency 'activesupport', '< 5' spec.add_development_dependency 'bundler', '>= 1.10' + spec.add_development_dependency 'os', '~> 1.0' spec.add_development_dependency 'pry', '~> 0.10' spec.add_development_dependency 'pry-rescue' spec.add_development_dependency 'pry-stack_explorer' spec.add_development_dependency 'rake', '~> 10.0' spec.add_development_dependency 'rb-readline', '~> 0.5.4' spec.add_development_dependency 'rspec', '~> 3.4.0' + spec.add_development_dependency 'rubocop', '~> 0.64.0' spec.add_development_dependency 'rubocop-git', '~> 0.1.1' spec.add_development_dependency 'simplecov' spec.add_development_dependency 'yard', '~> 0.9'