nurse/.agola/config.yml

56 lines
1.5 KiB
YAML
Raw Normal View History

2022-08-03 19:33:51 +00:00
version: v0
runs:
2022-09-22 09:46:36 +00:00
- name: Test and lint
2022-08-03 19:33:51 +00:00
tasks:
2022-09-22 09:46:36 +00:00
- name: Checkout code
runtime:
type: pod
containers:
2022-09-22 12:16:39 +00:00
- image: docker.io/alpine/git
2022-09-22 09:46:36 +00:00
steps:
- clone:
- save_to_workspace:
contents:
- source_dir: .
dest_dir: .
paths:
- '**'
2022-08-03 19:33:51 +00:00
- name: Test
runtime:
type: pod
containers:
- image: docker.io/golang:1.19-bullseye
environment:
DOCKER_HOST: tcp://127.0.0.1:2375
2022-09-22 09:30:39 +00:00
- image: code.icb4dc0.de/prskr/ci-images/dind:latest
privileged: true
2022-08-03 19:33:51 +00:00
steps:
2022-09-22 09:46:36 +00:00
- restore_workspace:
dest_dir: .
2022-08-07 18:10:40 +00:00
- run:
name: Install Go tools
command: go install gotest.tools/gotestsum@latest
2022-08-03 19:33:51 +00:00
- run:
name: run all tests
2022-08-07 18:10:40 +00:00
command: gotestsum -f pkgname-and-test-fails -- -race -shuffle=on ./...
2022-09-22 09:46:36 +00:00
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