我正在迁移到circleci2.0,并且在执行测试时成功构建后,它们随机失败并显示以下错误消息
/usr/local/go/pkg/tool/linux_amd64/link: signal: killed
/usr/local/go/pkg/tool/linux_amd64/link: flushing $WORK/b462/payment_step_svc.test: write $WORK/b462/svc.test: cannot allocate memory
我使用了以下配置
jobs:
build:
docker:
- image: circleci/golang:latest
- image: rabbitmq:3.5.4
- image: redis
working_directory: /go/src/github.com/soniabhishek/taskrunner
environment:
GOOS: linux
GOARCH: amd64
GOPATH: /go
steps:
- checkout
- run:
name: Get dependencies
command: go get -t -d -v ./...
- run:
name: Build all
command: go build ./...
- run:
name: Test all
command: go test -v ./...
除了最新的(1.10.3)之外,我已经尝试了许多 golang 版本。
虽然我找到了这个黑客,但我不确定为什么会发生这种情况,当我使用CGO_ENABLED=0时,我的所有测试都会运行
想知道为什么会出现此问题以及对此的永久解决方案