nurse/.agola/config.yml
Peter Kurfer b250a5177b
All checks were successful
agola/nurse/Test and lint The run finished successfully
chore: remove cache attempt
2022-09-22 14:16:39 +02:00

55 lines
1.5 KiB
YAML

version: v0
runs:
- name: Test and lint
tasks:
- name: Checkout code
runtime:
type: pod
containers:
- image: docker.io/alpine/git
steps:
- clone:
- save_to_workspace:
contents:
- source_dir: .
dest_dir: .
paths:
- '**'
- name: Test
runtime:
type: pod
containers:
- image: docker.io/golang:1.19-bullseye
environment:
DOCKER_HOST: tcp://127.0.0.1:2375
- image: code.icb4dc0.de/prskr/ci-images/dind:latest
privileged: true
steps:
- restore_workspace:
dest_dir: .
- run:
name: Install Go tools
command: go install gotest.tools/gotestsum@latest
- run:
name: run all tests
command: gotestsum -f pkgname-and-test-fails -- -race -shuffle=on ./...
depends:
- Checkout code
- name: Lint code
runtime:
type: pod
arch: amd64
containers:
- image: docker.io/golangci/golangci-lint
environment:
GO111MODULE: "on"
CGO_ENABLED: "0"
steps:
- restore_workspace:
dest_dir: .
- run:
name: Run golangci-lint
command: golangci-lint run -v
depends:
- Checkout code