4
4
build :
5
5
desc : Build the project
6
6
cmds :
7
- - go build -v -i -ldflags {{.LDFLAGS_VALUE }}
7
+ - go build -v -i {{.LDFLAGS }}
8
8
9
9
test :
10
10
desc : Run the full testsuite
@@ -15,26 +15,26 @@ tasks:
15
15
test-unit :
16
16
desc : Run unit tests only
17
17
cmds :
18
- - go test -short {{ default "-v" .GOFLAGS }} {{ default "./..." .TARGETS }}
18
+ - go test -short {{ default "-v" .GOFLAGS }} -coverprofile=coverage_unit.txt {{ default "./..." .TARGETS }}
19
19
20
20
test-integration :
21
21
desc : Run integration tests only
22
22
cmds :
23
- - go test -run Integration {{ default "-v" .GOFLAGS }} {{ default "./..." .TARGETS }} -ldflags {{.TEST_LDFLAGS_VALUE}}
24
-
23
+ - go test -run Integration {{ default "-v" .GOFLAGS }} -coverprofile=coverage_integ.txt {{ default "./..." .TARGETS }} {{.TEST_LDFLAGS}}
25
24
26
25
vars :
27
- # build flags
26
+ # build vars
28
27
VERSIONSTRING : " 0.3.6-alpha.preview"
29
28
COMMIT :
30
29
sh : echo ${TRAVIS_COMMIT:-`git log -n 1 --format=%h`}
31
- LDFLAGS_VALUE : >
32
- '-X github.com/arduino/arduino-cli/version.versionString={{.VERSIONSTRING}}
30
+ LDFLAGS : >
31
+ -ldflags '-X github.com/arduino/arduino-cli/version.versionString={{.VERSIONSTRING}}
33
32
-X github.com/arduino/arduino-cli/version.commit={{.COMMIT}}'
34
33
35
- # test flags
34
+ # test vars
35
+ GOFLAGS : " -timeout 5m -v -coverpkg=./... -covermode=atomic"
36
36
TEST_VERSIONSTRING : " 0.0.0-test.preview"
37
37
TEST_COMMIT : " deadbeef"
38
- TEST_LDFLAGS_VALUE : >
39
- '-X github.com/arduino/arduino-cli/version.versionString={{.TEST_VERSIONSTRING}}
38
+ TEST_LDFLAGS : >
39
+ -ldflags '-X github.com/arduino/arduino-cli/version.versionString={{.TEST_VERSIONSTRING}}
40
40
-X github.com/arduino/arduino-cli/version.commit={{.TEST_COMMIT}}'
0 commit comments