File tree Expand file tree Collapse file tree 2 files changed +16
-13
lines changed Expand file tree Collapse file tree 2 files changed +16
-13
lines changed Original file line number Diff line number Diff line change 11
11
# Make sure golangci-lint is vendored.
12
12
before_install :
13
13
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin v1.16.0
14
+ - go install github.com/go-task/task/cmd/task
15
+
14
16
15
17
install : true
16
18
@@ -20,9 +22,10 @@ script:
20
22
# Run linter
21
23
- golangci-lint run
22
24
# Build and test
23
- - go build
24
- - go test -timeout 20m -v -coverpkg=./... -coverprofile=coverage.txt -covermode=atomic ./...
25
+ - task build
26
+ - task test
25
27
26
28
after_success :
27
- - bash <(curl -s https://codecov.io/bash)
29
+ - bash <(curl -s https://codecov.io/bash) -cF unittests,integration
30
+
28
31
Original file line number Diff line number Diff line change 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}}'
You can’t perform that action at this time.
0 commit comments