forked from algolia/algoliasearch-client-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
45 lines (38 loc) · 1013 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
37
38
39
40
41
42
43
44
45
require 'bundler/gem_tasks'
require 'rake/testtask'
require 'rubocop/rake_task'
require 'git_precommit'
task(:default) { system 'rake --tasks' }
task test: 'test:unit'
RuboCop::RakeTask.new
GitPrecommit::PrecommitTasks.new
task :precommit do
Rake::Task['rubocop'].invoke
end
namespace :test do
Rake::TestTask.new(:unit) do |t|
t.libs << 'test'
t.libs << 'lib'
t.test_files = FileList['test/algolia/unit/**/*_test.rb']
t.verbose = true
t.warning = false
end
Rake::TestTask.new(:integration) do |t|
t.libs << 'test'
t.libs << 'lib'
t.test_files = FileList['test/algolia/integration/**/*_test.rb']
t.verbose = true
t.warning = false
end
desc 'Run unit and integration tests'
task :all do
Rake::Task['test:unit'].invoke
Rake::Task['test:integration'].invoke
end
end
desc 'Run linting, unit and integration tests'
task :all do
Rake::Task['rubocop'].invoke
Rake::Task['test:unit'].invoke
Rake::Task['test:integration'].invoke
end