first working build

This commit is contained in:
César Gallego Rodríguez
2019-09-04 10:59:30 +02:00
parent 7961ed1089
commit bc0ca07dc2
6 changed files with 48 additions and 1 deletions
+1
View File
@@ -1 +1,2 @@
__pycache__ __pycache__
coverage.html
+16
View File
@@ -0,0 +1,16 @@
.PHONY: test install acceptance deps
all: acceptance
test: deps
go test -race -coverprofile=/tmp/c.out github.com/BBVA/kapow/pkg/...
go tool cover -html=/tmp/c.out -o coverage.html
install: test
go install github.com/BBVA/kapow/...
acceptance: install
pipenv run make -C spec/test
deps:
go install github.com/spf13/cobra
+11
View File
@@ -0,0 +1,11 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
[requires]
python_version = "3.7"
+4 -1
View File
@@ -2,8 +2,11 @@ package main
import ( import (
"fmt" "fmt"
b "github.com/BBVA/kapow/pkg/banner"
) )
func main() { func main() {
fmt.Println("Kapow!") ban := b.Banner()
fmt.Println(ban)
} }
+5
View File
@@ -0,0 +1,5 @@
package banner
func Banner() string {
return "KAPOW!!!"
}
+11
View File
@@ -0,0 +1,11 @@
package banner
import "testing"
func TestBanner(t *testing.T) {
ban := Banner()
if ban != "KAPOW!!!" {
t.Errorf("Banner expected KAPOW!!!, but got %v", ban)
t.Fail()
}
}