forked from raviqqe/liche
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrakefile.rb
More file actions
47 lines (36 loc) · 789 Bytes
/
rakefile.rb
File metadata and controls
47 lines (36 loc) · 789 Bytes
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
46
47
task :deps do
sh 'go get github.com/alecthomas/gometalinter'
sh 'gometalinter --install'
sh 'go get -d -t ./...'
sh 'gem install rake rubocop'
sh 'bundler install'
end
task :build do
sh 'CGO_ENABLED=0 go build -o liche'
end
task :unit_test do
sh 'go test -covermode atomic -coverprofile coverage.txt'
end
task integration_test: :build do
sh 'bundler exec cucumber PATH=$PWD:$PATH'
end
task test: %i[unit_test integration_test]
task :format do
sh 'go fix ./...'
sh 'go fmt ./...'
Dir.glob '**/*.go' do |file|
sh "goimports -w #{file}"
end
sh 'rubocop -a'
end
task :lint do
sh 'gometalinter ./...'
sh 'rubocop'
end
task install: %i[deps test build] do
sh 'go get ./...'
end
task default: %i[test build]
task :clean do
sh 'git clean -dfx'
end