Unverified Commit bb7a5db3 authored by Massimiliano Pippi's avatar Massimiliano Pippi Committed by GitHub

Split test tasks (#249)

* split legacy tests

* explicitly run legacy test on master
parent 65a4fded
...@@ -23,6 +23,7 @@ script: ...@@ -23,6 +23,7 @@ script:
# Build and test # Build and test
- ./bin/task build - ./bin/task build
- ./bin/task test - ./bin/task test
- ./bin/task test-legacy
after_success: after_success:
- bash <(curl -s https://codecov.io/bash) -cF unittests,integration - bash <(curl -s https://codecov.io/bash) -cF unittests,integration
......
...@@ -7,7 +7,7 @@ tasks: ...@@ -7,7 +7,7 @@ tasks:
- go build -v -i {{.LDFLAGS}} - go build -v -i {{.LDFLAGS}}
test: test:
desc: Run the full testsuite desc: Run the full testsuite, `legacy` will be skipped
cmds: cmds:
- task: test-unit - task: test-unit
- task: test-integration - task: test-integration
...@@ -15,14 +15,21 @@ tasks: ...@@ -15,14 +15,21 @@ tasks:
test-unit: test-unit:
desc: Run unit tests only desc: Run unit tests only
cmds: 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: test-integration:
desc: Run integration tests only desc: Run integration tests only
cmds: 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: vars:
DEFAULT_TARGETS: "./arduino/... ./auth/... ./cli/... ./commands/... ./executils/... ./version/..."
# build vars # build vars
VERSIONSTRING: "0.3.6-alpha.preview" VERSIONSTRING: "0.3.6-alpha.preview"
COMMIT: COMMIT:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment