Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add travis config #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
language: ruby
sudo: false
cache: bundler
bundler_args: --retry=3 --jobs=3
before_script:
- bin/setup
- bin/rake db:test:prepare
rvm:
- 2.3.1
matrix:
fast_finish: true
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,7 @@ gem 'graphiql-rails'

# Handle CORS
gem 'rack-cors', require: 'rack/cors'

group :test do
gem 'codeclimate-test-reporter', require: false
end
10 changes: 10 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ GEM
ast (2.3.0)
builder (3.2.2)
byebug (9.0.5)
codeclimate-test-reporter (0.6.0)
simplecov (>= 0.7.1, < 1.0.0)
coffee-rails (4.2.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.2.x)
Expand All @@ -51,6 +53,7 @@ GEM
coffee-script-source (1.10.0)
concurrent-ruby (1.0.2)
debug_inspector (0.0.2)
docile (1.1.5)
erubis (2.7.0)
execjs (2.7.0)
ffi (1.9.14)
Expand All @@ -67,6 +70,7 @@ GEM
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (2.0.2)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
Expand Down Expand Up @@ -137,6 +141,11 @@ GEM
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
simplecov (0.12.0)
docile (~> 1.1.0)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
spring (1.7.2)
spring-watcher-listen (2.0.0)
listen (>= 2.7, < 4.0)
Expand Down Expand Up @@ -174,6 +183,7 @@ PLATFORMS

DEPENDENCIES
byebug
codeclimate-test-reporter
coffee-rails (~> 4.2)
graphiql-rails
graphql
Expand Down
6 changes: 4 additions & 2 deletions test/fixtures/goods.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
# model remove the '{}' from the fixture names and add the columns immediately
# below each fixture, per the syntax in the comments below
#
one: {}
# column: value
plane:
title: plane
description: WTF expensive
bidding_time: <%= 2.days.ago %>
#
two: {}
# column: value
7 changes: 4 additions & 3 deletions test/models/good_test.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
require 'test_helper'

class GoodTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
test 'title' do
plane = goods(:plane)
assert plane.title == 'plane'
end
end
3 changes: 3 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
require 'codeclimate-test-reporter'

CodeClimate::TestReporter.start

class ActiveSupport::TestCase
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
Expand Down