first working build
This commit is contained in:
@@ -1 +1,2 @@
|
|||||||
__pycache__
|
__pycache__
|
||||||
|
coverage.html
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
[[source]]
|
||||||
|
name = "pypi"
|
||||||
|
url = "https://pypi.org/simple"
|
||||||
|
verify_ssl = true
|
||||||
|
|
||||||
|
[dev-packages]
|
||||||
|
|
||||||
|
[packages]
|
||||||
|
|
||||||
|
[requires]
|
||||||
|
python_version = "3.7"
|
||||||
@@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package banner
|
||||||
|
|
||||||
|
func Banner() string {
|
||||||
|
return "KAPOW!!!"
|
||||||
|
}
|
||||||
@@ -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()
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user