Skip to content

Commit 5f66e34

Browse files
authored
Add CI (#5)
* Add CI * Try Ruby 2.3 * Update bundler * Add build matrix * Add integration test * Install Ruby dependencies for integration test * Debugging * Use Ruby 2.3 * Limit jest test files * Cache yarn * Cache bundler * Add JS linting * Ignore gem files when linting * Fix lint ignoring
1 parent d8efd82 commit 5f66e34

File tree

6 files changed

+32
-5
lines changed

6 files changed

+32
-5
lines changed

Diff for: .eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
vendor/

Diff for: .travis.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
matrix:
2+
include:
3+
- name: 'rspec Tests'
4+
language: ruby
5+
rvm:
6+
- 2.3
7+
cache: bundler
8+
before_install:
9+
- gem update --system
10+
- gem install bundler
11+
- name: "Integration Tests"
12+
language: node_js
13+
node_js: node
14+
cache: yarn
15+
before_install:
16+
- rvm use 2.3 --install --binary --fuzzy
17+
- ruby --version
18+
- gem update --system
19+
- gem install bundler
20+
- bundle install --jobs=3 --retry=3 --deployment
21+
script:
22+
- yarn test
23+
- yarn lint

Diff for: Gemfile.lock

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ GEM
1919
byebug (~> 11.0)
2020
pry (~> 0.10)
2121
rack (2.0.7)
22+
rake (12.3.2)
2223
rspec (3.8.0)
2324
rspec-core (~> 3.8.0)
2425
rspec-expectations (~> 3.8.0)
@@ -40,7 +41,8 @@ DEPENDENCIES
4041
apollo-federation!
4142
pry-byebug
4243
rack
44+
rake
4345
rspec
4446

4547
BUNDLED WITH
46-
2.0.1
48+
2.0.2

Diff for: Rakefile

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
require 'rspec/core/rake_task'
2+
RSpec::Core::RakeTask.new(:spec)
3+
task :default => :spec

Diff for: apollo-federation.gemspec

+1
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@ Gem::Specification.new do |spec|
2929

3030
spec.add_development_dependency 'pry-byebug'
3131
spec.add_development_dependency 'rack'
32+
spec.add_development_dependency 'rake'
3233
spec.add_development_dependency 'rspec'
3334
end

Diff for: jest.config.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,7 @@ module.exports = {
138138
// testLocationInResults: false,
139139

140140
// The glob patterns Jest uses to detect test files
141-
// testMatch: [
142-
// "**/__tests__/**/*.[jt]s?(x)",
143-
// "**/?(*.)+(spec|test).[tj]s?(x)"
144-
// ],
141+
testMatch: ['**/(*.)+(spec|test).[tj]s?(x)'],
145142

146143
// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
147144
// testPathIgnorePatterns: [

0 commit comments

Comments
 (0)