Skip to content

Commit e6a54fe

Browse files
authored
Split test tasks (#249)
* split legacy tests * explicitly run legacy test on master
1 parent bacd3cd commit e6a54fe

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

Diff for: .travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ script:
2323
# Build and test
2424
- ./bin/task build
2525
- ./bin/task test
26+
- ./bin/task test-legacy
2627

2728
after_success:
2829
- bash <(curl -s https://codecov.io/bash) -cF unittests,integration

Diff for: Taskfile.yml

+10-3
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,29 @@ tasks:
77
- go build -v -i {{.LDFLAGS}}
88

99
test:
10-
desc: Run the full testsuite
10+
desc: Run the full testsuite, `legacy` will be skipped
1111
cmds:
1212
- task: test-unit
1313
- task: test-integration
1414

1515
test-unit:
1616
desc: Run unit tests only
1717
cmds:
18-
- go test -short {{ default "-v" .GOFLAGS }} -coverprofile=coverage_unit.txt {{ default "./..." .TARGETS }}
18+
- go test -short {{ default "-v" .GOFLAGS }} -coverprofile=coverage_unit.txt {{ default .DEFAULT_TARGETS .TARGETS }}
1919

2020
test-integration:
2121
desc: Run integration tests only
2222
cmds:
23-
- go test -run Integration {{ default "-v" .GOFLAGS }} -coverprofile=coverage_integ.txt {{ default "./..." .TARGETS }} {{.TEST_LDFLAGS}}
23+
- go test -run Integration {{ default "-v" .GOFLAGS }} -coverprofile=coverage_integ.txt {{ default .DEFAULT_TARGETS .TARGETS }} {{.TEST_LDFLAGS}}
24+
25+
test-legacy:
26+
desc: Run tests for the `legacy` package
27+
cmds:
28+
- go test {{ default "-v" .GOFLAGS }} ./legacy/...
2429

2530
vars:
31+
DEFAULT_TARGETS: "./arduino/... ./auth/... ./cli/... ./commands/... ./executils/... ./version/..."
32+
2633
# build vars
2734
VERSIONSTRING: "0.3.6-alpha.preview"
2835
COMMIT:

0 commit comments

Comments
 (0)