55 lines
847 B
YAML
55 lines
847 B
YAML
kind: pipeline
|
|
type: docker
|
|
name: tests
|
|
|
|
steps:
|
|
- name: unit
|
|
image: golang
|
|
volumes:
|
|
- name: cache
|
|
path: /go
|
|
commands:
|
|
- go mod download
|
|
- go test -coverprofile=coverage.out -covermode=count ./...
|
|
- go tool cover -func=coverage.out | grep total
|
|
|
|
- name: race
|
|
image: golang
|
|
volumes:
|
|
- name: cache
|
|
path: /go
|
|
commands:
|
|
- go mod download
|
|
- go test -race ./...
|
|
|
|
volumes:
|
|
- name: cache
|
|
temp: {}
|
|
|
|
---
|
|
kind: pipeline
|
|
name: builds
|
|
|
|
steps:
|
|
- name: go
|
|
image: golang
|
|
volumes:
|
|
- name: cache
|
|
path: /go
|
|
commands:
|
|
- go mod download
|
|
- go build
|
|
|
|
- name: docker
|
|
image: plugins/docker
|
|
settings:
|
|
registry: docker.pkg.github.com
|
|
username: hamburghammer
|
|
password:
|
|
from_secret: DOCKER_REGISTRY_KEY
|
|
repo: docker.pkg.github.com/hamburghammer/gsave/gsave
|
|
auto_tag: true
|
|
|
|
depends_on:
|
|
- tests
|