This repository has been archived on 2023-11-25. You can view files and clone it, but cannot push or open issues or pull requests.
kreaper/.agola/config.yml

60 lines
1.5 KiB
YAML
Raw Normal View History

2022-09-22 07:46:56 +00:00
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: Run tests
runtime:
type: pod
arch: amd64
containers:
- image: docker.io/golang:1.19-bullseye
environment:
GO111MODULE: "on"
CGO_ENABLED: "1"
steps:
- restore_workspace:
dest_dir: .
- run:
name: Install gotestsum
command: go install gotest.tools/gotestsum@latest
- run:
name: Create out directory
command: mkdir -p out
- run:
name: Run tests
command: gotestsum -- -coverprofile=out/cover.txt -shuffle=on -race -covermode=atomic ./...
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