Skip to content

Commit 2a37d53

Browse files
committed
Test against GraphQL-Ruby 2.0, stop explicitly testing interpreter mode
Since GraphQL-Ruby 1.12 interpreter mode is enabled by default, so for GraphQL-Ruby 1.12, 1.13, and 2.0 it is being tested anyway.
1 parent 71f0f32 commit 2a37d53

File tree

9 files changed

+196
-37
lines changed

9 files changed

+196
-37
lines changed

.github/workflows/test.yml

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Run tests
1+
name: Tests
22

33
on:
44
pull_request:
@@ -10,42 +10,28 @@ on:
1010

1111
jobs:
1212
test:
13-
name: "Run tests"
14-
if: "!contains(github.event.head_commit.message, '[ci skip]')"
13+
name: "GraphQL-Ruby ${{ matrix.graphql-ruby }} on Ruby ${{ matrix.ruby }}"
1514
runs-on: ubuntu-latest
1615
strategy:
1716
fail-fast: false
1817
matrix:
1918
include:
19+
- ruby: "3.1"
20+
graphql-ruby: "2.0"
2021
- ruby: "3.0"
21-
graphql-ruby: "1.12"
22-
interpreter: yes
23-
- ruby: "3.0"
24-
graphql-ruby: "1.12"
25-
interpreter: no
22+
graphql-ruby: "1.13"
2623
- ruby: "2.7"
27-
graphql-ruby: "1.11"
28-
interpreter: yes
29-
- ruby: "2.7"
30-
graphql-ruby: "1.11"
31-
interpreter: no
32-
- ruby: "2.6"
33-
graphql-ruby: "1.10"
34-
interpreter: yes
24+
graphql-ruby: "1.12"
3525
- ruby: "2.6"
36-
graphql-ruby: "1.10"
37-
interpreter: no
26+
graphql-ruby: "1.11"
3827
- ruby: "2.5"
39-
graphql-ruby: "1.9"
40-
interpreter: yes
28+
graphql-ruby: "1.10"
4129
- ruby: "2.5"
4230
graphql-ruby: "1.9"
43-
interpreter: no
4431
container:
4532
image: ruby:${{ matrix.ruby }}
4633
env:
4734
CI: true
48-
GRAPHQL_RUBY_INTERPRETER: ${{ matrix.interpreter }}
4935
BUNDLE_GEMFILE: gemfiles/graphql_${{ matrix.graphql-ruby }}.gemfile
5036
steps:
5137
- uses: actions/checkout@v2

Appraisals

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,11 @@ end
1313
appraise "graphql-1.12" do
1414
gem "graphql", "~> 1.12.0"
1515
end
16+
17+
appraise "graphql-1.13" do
18+
gem "graphql", "~> 1.13.0"
19+
end
20+
21+
appraise "graphql-2.0" do
22+
gem "graphql", "~> 2.0.0"
23+
end

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ![Yabeda::GraphQL](./yabeda-graphql-logo.png)
22

3-
[![Build Status](https://travis-ci.org/yabeda-rb/yabeda-graphql.svg?branch=master)](https://travis-ci.org/yabeda-rb/yabeda-graphql)
3+
[![Tests](https://github.com/yabeda-rb/yabeda-graphql/actions/workflows/test.yml/badge.svg)](https://github.com/yabeda-rb/yabeda-graphql/actions/workflows/test.yml)
44

55
Built-in metrics for [GraphQL-Ruby] monitoring out of the box! Part of the [yabeda] suite.
66

@@ -55,8 +55,7 @@ After checking out the repo, run `bin/setup` to install dependencies.
5555
Then, run fololowing commands to run the tests against all supported versions of [GraphQL-Ruby]:
5656

5757
```sh
58-
GRAPHQL_RUBY_INTERPRETER=yes bundle exec appraisal rspec
59-
GRAPHQL_RUBY_INTERPRETER=no bundle exec appraisal rspec
58+
bundle exec appraisal rspec
6059
```
6160

6261
You can also run `bin/console` for an interactive prompt that will allow you to experiment.

gemfiles/graphql_1.13.gemfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
gem "graphql", "~> 1.13.0"
6+
7+
group :development, :test do
8+
gem "pry"
9+
gem "pry-inline"
10+
gem "pry-byebug", platform: :mri
11+
gem "graphql-batch"
12+
end
13+
14+
gemspec path: "../"

gemfiles/graphql_1.13.gemfile.lock

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
PATH
2+
remote: ..
3+
specs:
4+
yabeda-graphql (0.2.1)
5+
graphql (>= 1.9, < 3)
6+
yabeda (~> 0.2)
7+
8+
GEM
9+
remote: https://rubygems.org/
10+
specs:
11+
anyway_config (2.3.0)
12+
ruby-next-core (>= 0.14.0)
13+
appraisal (2.4.1)
14+
bundler
15+
rake
16+
thor (>= 0.14.0)
17+
byebug (11.1.3)
18+
coderay (1.1.3)
19+
concurrent-ruby (1.1.10)
20+
diff-lcs (1.5.0)
21+
dry-initializer (3.1.1)
22+
graphql (1.13.11)
23+
graphql-batch (0.5.1)
24+
graphql (>= 1.10, < 3)
25+
promise.rb (~> 0.7.2)
26+
method_source (1.0.0)
27+
promise.rb (0.7.4)
28+
pry (0.13.1)
29+
coderay (~> 1.1)
30+
method_source (~> 1.0)
31+
pry-byebug (3.9.0)
32+
byebug (~> 11.0)
33+
pry (~> 0.13.0)
34+
pry-inline (1.0.7)
35+
pry (> 0.10.0)
36+
unicode (~> 0.4.4)
37+
rake (13.0.6)
38+
rspec (3.11.0)
39+
rspec-core (~> 3.11.0)
40+
rspec-expectations (~> 3.11.0)
41+
rspec-mocks (~> 3.11.0)
42+
rspec-core (3.11.0)
43+
rspec-support (~> 3.11.0)
44+
rspec-expectations (3.11.0)
45+
diff-lcs (>= 1.2.0, < 2.0)
46+
rspec-support (~> 3.11.0)
47+
rspec-mocks (3.11.1)
48+
diff-lcs (>= 1.2.0, < 2.0)
49+
rspec-support (~> 3.11.0)
50+
rspec-support (3.11.0)
51+
ruby-next-core (0.15.0)
52+
thor (1.2.1)
53+
unicode (0.4.4.4)
54+
yabeda (0.11.0)
55+
anyway_config (>= 1.0, < 3)
56+
concurrent-ruby
57+
dry-initializer
58+
59+
PLATFORMS
60+
x86_64-linux
61+
62+
DEPENDENCIES
63+
appraisal
64+
bundler
65+
graphql (~> 1.13.0)
66+
graphql-batch
67+
pry
68+
pry-byebug
69+
pry-inline
70+
rake (~> 13.0)
71+
rspec (~> 3.0)
72+
yabeda-graphql!
73+
74+
BUNDLED WITH
75+
2.3.10

gemfiles/graphql_2.0.gemfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
gem "graphql", "~> 2.0.0"
6+
7+
group :development, :test do
8+
gem "pry"
9+
gem "pry-inline"
10+
gem "pry-byebug", platform: :mri
11+
gem "graphql-batch"
12+
end
13+
14+
gemspec path: "../"

gemfiles/graphql_2.0.gemfile.lock

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
PATH
2+
remote: ..
3+
specs:
4+
yabeda-graphql (0.2.1)
5+
graphql (>= 1.9, < 3)
6+
yabeda (~> 0.2)
7+
8+
GEM
9+
remote: https://rubygems.org/
10+
specs:
11+
anyway_config (2.3.0)
12+
ruby-next-core (>= 0.14.0)
13+
appraisal (2.4.1)
14+
bundler
15+
rake
16+
thor (>= 0.14.0)
17+
byebug (11.1.3)
18+
coderay (1.1.3)
19+
concurrent-ruby (1.1.10)
20+
diff-lcs (1.5.0)
21+
dry-initializer (3.1.1)
22+
graphql (2.0.5)
23+
graphql-batch (0.5.1)
24+
graphql (>= 1.10, < 3)
25+
promise.rb (~> 0.7.2)
26+
method_source (1.0.0)
27+
promise.rb (0.7.4)
28+
pry (0.13.1)
29+
coderay (~> 1.1)
30+
method_source (~> 1.0)
31+
pry-byebug (3.9.0)
32+
byebug (~> 11.0)
33+
pry (~> 0.13.0)
34+
pry-inline (1.0.7)
35+
pry (> 0.10.0)
36+
unicode (~> 0.4.4)
37+
rake (13.0.6)
38+
rspec (3.11.0)
39+
rspec-core (~> 3.11.0)
40+
rspec-expectations (~> 3.11.0)
41+
rspec-mocks (~> 3.11.0)
42+
rspec-core (3.11.0)
43+
rspec-support (~> 3.11.0)
44+
rspec-expectations (3.11.0)
45+
diff-lcs (>= 1.2.0, < 2.0)
46+
rspec-support (~> 3.11.0)
47+
rspec-mocks (3.11.1)
48+
diff-lcs (>= 1.2.0, < 2.0)
49+
rspec-support (~> 3.11.0)
50+
rspec-support (3.11.0)
51+
ruby-next-core (0.15.0)
52+
thor (1.2.1)
53+
unicode (0.4.4.4)
54+
yabeda (0.11.0)
55+
anyway_config (>= 1.0, < 3)
56+
concurrent-ruby
57+
dry-initializer
58+
59+
PLATFORMS
60+
x86_64-linux
61+
62+
DEPENDENCIES
63+
appraisal
64+
bundler
65+
graphql (~> 2.0.0)
66+
graphql-batch
67+
pry
68+
pry-byebug
69+
pry-inline
70+
rake (~> 13.0)
71+
rspec (~> 3.0)
72+
yabeda-graphql!
73+
74+
BUNDLED WITH
75+
2.3.10

spec/spec_helper.rb

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
require "bundler/setup"
22
require "yabeda/graphql"
33
require "pry"
4-
require "yaml"
5-
6-
TESTING_GRAPHQL_RUBY_INTERPRETER =
7-
begin
8-
env_value = ENV["GRAPHQL_RUBY_INTERPRETER"]
9-
env_value ? YAML.safe_load(env_value) : false
10-
end
114

125
require_relative "support/graphql_schema"
136

spec/support/graphql_schema.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,6 @@ def product_updated; end
8787
class YabedaSchema < GraphQL::Schema
8888
use Yabeda::GraphQL
8989

90-
if TESTING_GRAPHQL_RUBY_INTERPRETER
91-
use GraphQL::Execution::Interpreter
92-
use GraphQL::Analysis::AST
93-
end
94-
9590
query QueryType
9691
mutation MutationType
9792
subscription SubscriptionType

0 commit comments

Comments
 (0)