diff --git a/.travis.yml b/.travis.yml index 82c5199f34..e0117713ad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,11 +34,11 @@ before_script: - bundle exec rake clean assets:precompile script: -- bundle exec rake parallel:spec[1] +- bundle exec rspec spec - bundle exec rake shfmt - bundle exec rake assert_clean - bundle exec rake shellcheck -- bundle exec rake assert_examples[parallel] +- bundle exec rake assert_examples after_success: bundle exec codeclimate-test-reporter diff --git a/lib/travis/build/config.rb b/lib/travis/build/config.rb index fd7eb588af..0fa0dd5d66 100644 --- a/lib/travis/build/config.rb +++ b/lib/travis/build/config.rb @@ -84,6 +84,7 @@ def sc_data 'TRAVIS_BUILD_INTERNAL_RUBY_REGEX', '^ruby-(2\.[0-4]\.[0-9]|1\.9\.3)' ), + lang_archive_host: ENV.fetch('TRAVIS_LANGUAGE_ARCHIVE_HOST', 's3'), librato: { email: ENV.fetch( 'TRAVIS_BUILD_LIBRATO_EMAIL', ENV.fetch('LIBRATO_EMAIL', '') diff --git a/lib/travis/build/script.rb b/lib/travis/build/script.rb index 1c24afa618..d9a8f8ee6c 100644 --- a/lib/travis/build/script.rb +++ b/lib/travis/build/script.rb @@ -183,13 +183,26 @@ def archive_url_for(bucket, version, lang = lang_name, ext = 'bz2') sh.raw "travis_rel=$(sw_vers -productVersion)" sh.raw "travis_rel_version=${travis_rel%*.*}" end + lang = 'python' if lang.start_with?('py') "archive_url=https://#{lang_archive_prefix(lang, bucket)}/binaries/${travis_host_os}/${travis_rel_version}/$(uname -m)/#{file_name}" end def lang_archive_prefix(lang, bucket) custom_archive = ENV["TRAVIS_BUILD_LANG_ARCHIVES_#{lang}".upcase] + unless custom_archive.to_s.empty? + return custom_archive.output_safe + end - custom_archive.to_s.empty? ? "s3.amazonaws.com/#{bucket}" : custom_archive.output_safe + case Travis::Build.config.lang_archive_host + when 'gcs' + "storage.googleapis.com/travis-ci-language-archives/#{lang}" + when 's3' + "s3.amazonaws.com/#{bucket}" + when 'cdn' + "language-archives.travis-ci.com/#{lang}" + else + "s3.amazonaws.com/#{bucket}" # explicitly state default + end end def debug_build_via_api? diff --git a/lib/travis/build/script/shared/rvm.rb b/lib/travis/build/script/shared/rvm.rb index 8cd38b0dc4..25db6c9c24 100644 --- a/lib/travis/build/script/shared/rvm.rb +++ b/lib/travis/build/script/shared/rvm.rb @@ -15,9 +15,10 @@ module RVM ) RVM_VERSION_ALIASES = { - '2.3' => '2.3.7', - '2.4' => '2.4.4', - '2.5' => '2.5.1' + '2.3' => '2.3.8', + '2.4' => '2.4.5', + '2.5' => '2.5.4', + '2.6' => '2.6.2', } RVM_GPG_KEY_IDS = %w( diff --git a/spec/build/script/elixir_spec.rb b/spec/build/script/elixir_spec.rb index 23d8f2ed20..305108f2b0 100644 --- a/spec/build/script/elixir_spec.rb +++ b/spec/build/script/elixir_spec.rb @@ -92,4 +92,3 @@ def self.installs_required_otp_release(elixir_version, otp_release_wanted, otp_r installs_required_otp_release('1.0.5', '18.0', '17.4') installs_required_otp_release('1.0.5', 'R16B03-1', '17.4') end - diff --git a/spec/build/script/erlang_spec.rb b/spec/build/script/erlang_spec.rb index 38fff0a362..d757c103d4 100644 --- a/spec/build/script/erlang_spec.rb +++ b/spec/build/script/erlang_spec.rb @@ -74,4 +74,3 @@ it { is_expected.to eq("cache-#{CACHE_SLUG_EXTRAS}--otp-R14B04") } end end - diff --git a/spec/build/script/python_spec.rb b/spec/build/script/python_spec.rb index 658ed366aa..667d3952b5 100644 --- a/spec/build/script/python_spec.rb +++ b/spec/build/script/python_spec.rb @@ -92,6 +92,26 @@ expect(branch).to include_sexp [:raw, "archive_url=https://cdn.of.lots.of.python.stuff/binaries/${travis_host_os}/${travis_rel_version}/$(uname -m)/python-#{version}.tar.bz2"] end end + + context 'and using gcs as language archive host' do + before :each do + @old_lang_archive_host = Travis::Build.config.lang_archive_host + Travis::Build.config.lang_archive_host = 'gcs' + end + + after { Travis::Build.config.lang_archive_host = @old_lang_archive_host } + + it "downloads archive" do + ENV[''] + branch = sexp_find(sexp, [:then]) + expect(branch).to include_sexp [:raw, "archive_url=https://storage.googleapis.com/travis-ci-language-archives/python/binaries/${travis_host_os}/${travis_rel_version}/$(uname -m)/python-#{version}.tar.bz2"] + end + + it 'sets up pypy' do + data[:config][:python] = 'pypy-5.3.1' + should include_sexp [:raw, "archive_url=https://storage.googleapis.com/travis-ci-language-archives/python/binaries/${travis_host_os}/${travis_rel_version}/$(uname -m)/pypy-5.3.1.tar.bz2"] + end + end end it 'announces python --version' do diff --git a/spec/build/script/ruby_spec.rb b/spec/build/script/ruby_spec.rb index 3c3b86e496..dfd31c6ee6 100644 --- a/spec/build/script/ruby_spec.rb +++ b/spec/build/script/ruby_spec.rb @@ -186,7 +186,7 @@ it 'ensures rvm alias is defined' do sexp = sexp_find(subject, [:if, "-z $(rvm alias list | grep ^2\\\\.3)"], [:then]) store_example(name: 'rvm-alias') - expect(sexp).to include_sexp [:cmd, "rvm alias create 2.3 ruby-2.3.7", assert: true, echo: true, timing: true] + expect(sexp).to include_sexp [:cmd, "rvm alias create 2.3 ruby-2.3.8", assert: true, echo: true, timing: true] end end