Skip to content

Commit

Permalink
Travis stuff for this repo
Browse files Browse the repository at this point in the history
  • Loading branch information
mlt committed Nov 28, 2019
1 parent 8cfa3e8 commit 4545161
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 5 deletions.
28 changes: 24 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,30 @@
git:
depth: 1
branches:
only:
- wip_mlt
addons:
chrome: stable
env:
global:
- secure: "d0qFbD7GhsyaLgsulFD5tMMFHyuqAn8LrjC5DVOK6OvHx7T0Z9cjetzxxm+h+Gz5eAUfclS8d5P8iJQGRpVgwF+6EBoyLDAvJTCt7+N0FTTqsJwupQynfr3wtnqTbqQIsgAHB9kmz3WPoPztLbragOiFSZLMAkSOj3qKtpVwpeEmaXZe2r+dafrwWE7uFt+hnnLCxmSznGE+c8habCi+PTwtCmbUDkf4l68Nmvn7+iE11b9RVVRNGLNdfxQo85LL57dN/6midA3pL8djBkokPTjHrchA4mg1z9vR0KjW6iA6HdkSq/EtFRTVrFyJqHwuO0u8WIIQWlxmutEBLNpoTsgqQFxwUhVl3ymy/xZQWHCHCXf/+N+zitV8OWQrqx+vgb81QbHjsi1wGpMbOWODEaSfsLqQTnTeuhlFMmMWM97+PaPorou54x69QAO2wT5ip8NZBSv0l0p3/NS3ShEw2h6JuRmH3NTUH2dN5mMKkwGm3aJQNWOPYc+SNbW6p6+P75rzLisdHkAlV/hqh6K3dOVlau3/4H11mLI2mMEwIxrm+wbhhKfu/gyo6/YV6VoojF1Alqo14P5b9Vmm8V4+sP6m8DPEyi5AQtqXi+Rw+GKeYHPIeGIUY5vs0PzB4lG3eYKh/1bLWHtaXMXVW3fCKQnpYNGl3id/uzmKkRXSajA="
language: ruby
rvm:
# - 2.1.10
- 2.2.6
- 2.3.3
- 2.4.4
- 2.5.1
- jruby-9.1.13.0
- jruby-9.2.0.0
cache:
bundler: true
directories:
- /home/travis/.rvm/
- /home/travis/.chromedriver-helper/
before_install:
- openssl aes-256-cbc -K $encrypted_1be6b4981a28_key -iv $encrypted_1be6b4981a28_iv -in gcs_credentials.json.enc -out gcs_credentials.json -d
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script: "bundle exec rspec spec"
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT

3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ group :test do
gem 'simplecov', :require => false
gem 'selenium-webdriver'
gem 'chromedriver-helper' if ENV['CI']
gem 'capybara-screenshot'
gem 'capybara-screenshot', github: 'mlt/capybara-screenshot', branch: 'gcs'
gem 'google-cloud-storage' if ENV['CI']
end


Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Tabulatr2 (modified)
[![Build Status](https://travis-ci.com/mlt/tabulatr2.svg?branch=wip_mlt)](https://travis-ci.com/mlt/tabulatr2)
[![Maintainability](https://api.codeclimate.com/v1/badges/ba31d13164c4f5c73177/maintainability)](https://codeclimate.com/github/mlt/tabulatr2/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/ba31d13164c4f5c73177/test_coverage)](https://codeclimate.com/github/mlt/tabulatr2/test_coverage)

This is a work-in-progress branch with my (mlt) modifications on top of original tabulatr2
that have not been merged (yet?). This branch is mostly for my own amusement but you may find it useful.
Expand Down
Binary file added gcs_credentials.json.enc
Binary file not shown.
12 changes: 12 additions & 0 deletions spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,18 @@
"screenshot_#{example.description.gsub(' ', '-').gsub(/^.*\/spec\//,'')}"
end

if ENV['CI']
Capybara::Screenshot.gcs_configuration = {
credentials: 'gcs_credentials.json',
bucket_name: "jksdhgjkdhgjkd",
}

Capybara::Screenshot.gcs_object_configuration = {
content_encoding: 'gzip',
acl: 'public_read'
}
end

# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
Dir[Rails.root.join("../support/**/*.rb")].each { |f| require f }
Expand Down

0 comments on commit 4545161

Please sign in to comment.