Versions and setup
We have Go 1.17 installed by default in our virtual machine. To change to another Go version, use this script in your Setup Commands.
Frameworks And Testing
We support all Go tools and test frameworks. You can run your tests with
a standard go test -v
or by using test frameworks such as gocheck.
For example, using gocheck would look like:
go get launchpad.net/gocheck
go test -gocheck.v
Parallel Testing
If you are running parallel test pipelines, you will want separate your tests into groups and call a group specifically in each pipeline. For instance:
Pipeline 1:
go test tests_1.go
Pipeline 2:
go test tests_2.go
Parallelization Modules
In addition to parallelizing your tests explicitly via parallel pipelines, some customers have found using Go’s built-in test parallelization is a good way to speed up your tests.
Note that aggressive parallelization can cause resource and build failure issues, as well.
Notes And Known Issues
Due to Go version and build issues, you may find it helpful to tests your commands with different versions via an SSH debug session if tests are running differently on CodeShip compared to your local machine.