forked from DmitryTsepelev/graphql-ruby-persisted_queries
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
36 lines (28 loc) · 880 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
require "bundler/gem_tasks"
require "rspec/core/rake_task"
require "rubocop/rake_task"
RSpec::Core::RakeTask.new(:spec)
RuboCop::RakeTask.new
desc "Run specs for compiled queries"
RSpec::Core::RakeTask.new("spec:compiled_queries") do |task|
task.pattern = "**/compiled_queries/**"
task.verbose = false
end
RSpec::Core::RakeTask.new("spec:without_compiled_queries") do |task|
task.exclude_pattern = "**/compiled_queries/**"
task.verbose = false
end
task ci_specs: ["spec:without_compiled_queries", "spec:compiled_queries"]
task :bench_gql do
cmd = %w[bundle exec ruby benchmark/plain_gql.rb]
system(*cmd)
end
task :bench_pq do
cmd = %w[bundle exec ruby benchmark/persisted_queries.rb]
system(*cmd)
end
task :bench_compiled do
cmd = %w[bundle exec ruby benchmark/compiled_queries.rb]
system(*cmd)
end
task bench: [:bench_gql, :bench_pq, :bench_compiled]