Sha256: 3284d90072186679655bdb7a03f845ad0b257f0614f59ef779d4338e09bc4f2a

Contents?: true

Size: 1.17 KB

Versions: 1

Compression:

Stored size: 1.17 KB

Contents

#!/usr/bin/env ruby

# this runs all the tests on the current code base
# any edits take effect immediately
# test output is logged to log/test_runs.log
# make sure log/ and log/test_runs.log is writeable by docker

# `docker build -f Dockerfile_test -t ruby_appoptics_apm .`
# (docker-compose will build it too if missing)


# remove rbenv .ruby_version file that may be stuck on a different ruby version
# because we mounted this directory in a docker container
require 'fileutils'
FileUtils.rm_f('.ruby_version')

require 'yaml'
travis = YAML.load_file('.travis.yml')

matrix = []
travis['rvm'].each do |rvm|
  travis['gemfile'].each do |gemfile|
    travis['env'].each do |env|
      matrix << { "rvm" => rvm, "gemfile" => gemfile, 'env' => env}
    end
  end
end

travis['matrix']['exclude'].each do |h|
  matrix.delete_if do |m|
    m == m.merge(h)
  end
end

matrix.each do |args|
  puts "docker-compose run --rm --service-ports ruby_appoptics_apm /code/ruby-appoptics_apm/ruby_setup.sh #{args['rvm']} #{args['gemfile']} #{args['env']}"
  `docker-compose run --rm --service-ports ruby_appoptics_apm /code/ruby-appoptics_apm/ruby_setup.sh #{args['rvm']} #{args['gemfile']} #{args['env']}`
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
appoptics_apm-4.2.3 run_tests_docker.rb