nurse/.concourse/tasks/test.yml
Peter Kurfer 8044542044
All checks were successful
concourse-ci/golangci-lint golangci-lint run
concourse-ci/gotestsum gotestsum
feat(ci): add test task
2022-12-31 10:53:37 +01:00

41 lines
877 B
YAML

---
platform: linux
image_resource:
type: registry-image
source:
repository: code.icb4dc0.de/prskr/pipelines/dind-go
tag: latest
username: ((gitea-credentials.user))
password: ((gitea-credentials.token))
inputs:
- name: repo
path: .
params:
GO111MODULE: "on"
CGO_ENABLED: "1"
DOCKER_HOST: tcp://127.0.0.1:2375
GITEA_TOKEN: ((gitea-credentials.token))
run:
path: bash
args:
- -ce
- |
dockerd -H $DOCKER_HOST >/tmp/docker.log 2>&1 &
echo $! > /tmp/docker.pid
go install gotest.tools/gotestsum@latest
echo waiting for docker to come up...
until docker info >/dev/null 2>&1; do
sleep 1
if ! kill -0 "$(cat /tmp/docker.pid)" 2>/dev/null; then
cat /tmp/docker.log
return 1
fi
done
gotestsum -f pkgname-and-test-fails -- -race -shuffle=on ./...