From cc7ae059b8b2420a205472d7ad1de93b59bf61ae Mon Sep 17 00:00:00 2001 From: Massimiliano Pippi Date: Thu, 13 Jun 2019 14:34:06 +0200 Subject: [PATCH 1/2] split legacy tests --- Taskfile.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Taskfile.yml b/Taskfile.yml index e72d85d6fcc..aea81983b6a 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -7,7 +7,7 @@ tasks: - go build -v -i {{.LDFLAGS}} test: - desc: Run the full testsuite + desc: Run the full testsuite, `legacy` will be skipped cmds: - task: test-unit - task: test-integration @@ -15,14 +15,21 @@ tasks: test-unit: desc: Run unit tests only cmds: - - go test -short {{ default "-v" .GOFLAGS }} -coverprofile=coverage_unit.txt {{ default "./..." .TARGETS }} + - go test -short {{ default "-v" .GOFLAGS }} -coverprofile=coverage_unit.txt {{ default .DEFAULT_TARGETS .TARGETS }} test-integration: desc: Run integration tests only cmds: - - go test -run Integration {{ default "-v" .GOFLAGS }} -coverprofile=coverage_integ.txt {{ default "./..." .TARGETS }} {{.TEST_LDFLAGS}} + - go test -run Integration {{ default "-v" .GOFLAGS }} -coverprofile=coverage_integ.txt {{ default .DEFAULT_TARGETS .TARGETS }} {{.TEST_LDFLAGS}} + + test-legacy: + desc: Run tests for the `legacy` package + cmds: + - go test {{ default "-v" .GOFLAGS }} ./legacy/... vars: + DEFAULT_TARGETS: "./arduino/... ./auth/... ./cli/... ./commands/... ./executils/... ./version/..." + # build vars VERSIONSTRING: "0.3.6-alpha.preview" COMMIT: From d1c0d0a2a4d2c9e0acbf506570b2c59769b84d83 Mon Sep 17 00:00:00 2001 From: Massimiliano Pippi Date: Thu, 13 Jun 2019 14:35:13 +0200 Subject: [PATCH 2/2] explicitly run legacy test on master --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index e0792890dbf..f96024ab445 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,6 +23,7 @@ script: # Build and test - ./bin/task build - ./bin/task test + - ./bin/task test-legacy after_success: - bash <(curl -s https://codecov.io/bash) -cF unittests,integration