This repository was archived by the owner on Sep 30, 2020. It is now read-only.
File tree 4 files changed +34
-6
lines changed
4 files changed +34
-6
lines changed Original file line number Diff line number Diff line change 1
1
/artifacts /template.json
2
2
/bin
3
- /assets
3
+ /e2e / assets
4
4
* ~
5
5
/config /templates.go
6
6
.idea /
7
7
.envrc
8
+ coverage.txt
9
+ profile.out
Original file line number Diff line number Diff line change 3
3
- 1.7
4
4
go_import_path : github.com/coreos/kube-aws
5
5
script :
6
- - make test
6
+ - make test-with-cover
7
+ after_success :
8
+ - bash <(curl -s https://codecov.io/bash)
Original file line number Diff line number Diff line change 9
9
10
10
.PHONY : test
11
11
test : build
12
- test -z " $$ (find . -path ./vendor -prune -type f -o -name '*.go' -exec gofmt -d {} + | tee /dev/stderr)"
13
- go test -v $$(go list ./... | grep -v '/vendor/' )
14
- go vet $$(go list ./... | grep -v '/vendor/' )
12
+ ./test
13
+
14
+ .PHONY : test-with-cover
15
+ test-with-cover : build
16
+ ./test with-cover
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -euo pipefail
3
3
4
- go test $( go list ./... | grep -v ' /vendor/' )
4
+ default () {
5
+ test -z " $( find . -path ./vendor -prune -type f -o -name ' *.go' -exec gofmt -d {} + | tee /dev/stderr) "
6
+ go test -v $( go list ./... | grep -v ' /vendor/' )
7
+ go vet $( go list ./... | grep -v ' /vendor/' )
8
+ }
9
+
10
+ with-cover () {
11
+ test -z " $( find . -path ./vendor -prune -type f -o -name ' *.go' -exec gofmt -d {} + | tee /dev/stderr) "
12
+ for d in $( go list ./... | grep -v ' /vendor/' ) ; do
13
+ go test -v --race -coverprofile=profile.out -covermode=atomic $d
14
+ if [ -f profile.out ]; then
15
+ cat profile.out >> coverage.txt
16
+ rm profile.out
17
+ fi
18
+ done
19
+ go vet $( go list ./... | grep -v ' /vendor/' )
20
+ }
21
+
22
+ if [ -z ${1+x} ]; then
23
+ default
24
+ else
25
+ " $@ "
26
+ fi
You can’t perform that action at this time.
0 commit comments