mirror of https://github.com/statping/statping
sass ENV - gocov
parent
4ab4b1f5c0
commit
ef9c1a911c
7
Makefile
7
Makefile
|
@ -34,10 +34,11 @@ compile:
|
||||||
cd source && $(GOPATH)/bin/rice embed-go
|
cd source && $(GOPATH)/bin/rice embed-go
|
||||||
$(GOPATH)/bin/wt compile source/scss/base.scss -b source/css
|
$(GOPATH)/bin/wt compile source/scss/base.scss -b source/css
|
||||||
|
|
||||||
test: clean compile test-env
|
test: clean compile
|
||||||
gocov test -v ./... -p 1 -ldflags="-X main.VERSION=$(VERSION)" -covermode=count > coverage.json
|
go test -v ./... -p 1 -ldflags="-X main.VERSION=$(VERSION)" -coverprofile=coverage.out
|
||||||
|
gocov convert coverage.out > coverage.json
|
||||||
|
|
||||||
test-all: compile test-env databases
|
test-all: compile databases
|
||||||
$(GOTEST) ./... -p 1 -ldflags="-X main.VERSION=$(VERSION)" -coverprofile=coverage.out -v
|
$(GOTEST) ./... -p 1 -ldflags="-X main.VERSION=$(VERSION)" -coverprofile=coverage.out -v
|
||||||
|
|
||||||
coverage:
|
coverage:
|
||||||
|
|
|
@ -47,8 +47,8 @@ func TestVersionCLI(t *testing.T) {
|
||||||
func TestAssetsCLI(t *testing.T) {
|
func TestAssetsCLI(t *testing.T) {
|
||||||
run := CatchCLI([]string{"statup", "assets"})
|
run := CatchCLI([]string{"statup", "assets"})
|
||||||
assert.Nil(t, run)
|
assert.Nil(t, run)
|
||||||
assert.FileExists(t, "../assets/css/base.css")
|
assert.FileExists(t, dir+"/assets/css/base.css")
|
||||||
assert.FileExists(t, "../assets/scss/base.scss")
|
assert.FileExists(t, dir+"/assets/scss/base.scss")
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestSassCLI(t *testing.T) {
|
func TestSassCLI(t *testing.T) {
|
||||||
|
@ -57,7 +57,7 @@ func TestSassCLI(t *testing.T) {
|
||||||
}
|
}
|
||||||
run := CatchCLI([]string{"statup", "sass"})
|
run := CatchCLI([]string{"statup", "sass"})
|
||||||
assert.Nil(t, run)
|
assert.Nil(t, run)
|
||||||
assert.FileExists(t, "../assets/css/base.css")
|
assert.FileExists(t, dir+"/assets/css/base.css")
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestUpdateCLI(t *testing.T) {
|
func TestUpdateCLI(t *testing.T) {
|
||||||
|
|
|
@ -31,7 +31,7 @@ func Assets() {
|
||||||
func CompileSASS(folder string) error {
|
func CompileSASS(folder string) error {
|
||||||
sassBin := os.Getenv("SASS")
|
sassBin := os.Getenv("SASS")
|
||||||
if sassBin == "" {
|
if sassBin == "" {
|
||||||
return errors.New("missing the SASS executable environment variable")
|
sassBin = "sass"
|
||||||
}
|
}
|
||||||
|
|
||||||
scssFile := fmt.Sprintf("%v/%v", folder, "assets/scss/base.scss")
|
scssFile := fmt.Sprintf("%v/%v", folder, "assets/scss/base.scss")
|
||||||
|
|
Loading…
Reference in New Issue