awl/.drone.jsonnet
Sam Therapy 1b5d5a3fed
Some checks failed
continuous-integration/drone/push Build is failing
Do "a few things"
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2022-07-20 23:14:15 +02:00

67 lines
No EOL
1.1 KiB
Text

local testing(version, arch) = {
kind: "pipeline",
name: version + "-" + arch ,
platform: {
arch: arch
},
steps: [
{
name: "lint",
image: "rancher/drone-golangci-lint:latest"
},
{
name: "test",
image: "golang:" + version,
commands: [
"go test -race -v ./... -cover"
]
},
]
};
// "Inspired by" https://goreleaser.com/ci/drone/
local release() = {
kind: "pipeline",
name: "release",
trigger: {
event: "tag"
},
steps: [
{
name: "fetch",
image: "docker:git",
commands : [
"git fetch --tags"
]
},
{
name: "test",
image: "golang",
commands: [
"go test -race -v ./... -cover"
]
},
{
name: "release",
image: "goreleaser/goreleaser",
environment: {
"GITEA_TOKEN": {
from_secret: "GITEA_TOKEN"
}
},
commands: [
"goreleaser release"
],
// when: {
// event: "tag"
// }
}
]
};
// logawl uses generics so 1.18 is the minimum
[
testing("1.18", "amd64"),
testing("1.18", "arm64"),
release()
]