Migrate to bkit, add linting
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
version: "2"
|
||||||
|
|
||||||
|
run:
|
||||||
|
timeout: 5m
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
local project = import 'brewkit/project.libsonnet';
|
local project = import 'bkit/project.libsonnet';
|
||||||
|
|
||||||
local appIDs = [
|
local appIDs = [
|
||||||
"anon3anon",
|
"anon3anon",
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
gobuilder: "golang:1.24-alpine",
|
||||||
|
golangcilint: "golangci/golangci-lint:v2.1-alpine",
|
||||||
|
}
|
||||||
@@ -18,10 +18,10 @@ local gocache = [
|
|||||||
|
|
||||||
{
|
{
|
||||||
project(appIDs):: {
|
project(appIDs):: {
|
||||||
apiVersion: "brewkit/v1",
|
apiVersion: "bkit/v1",
|
||||||
|
|
||||||
targets: {
|
targets: {
|
||||||
all: ["modules", "build"],
|
all: ["modules", "build", "check"],
|
||||||
} + {
|
} + {
|
||||||
modules: ["gotidy", "modulesvendor"],
|
modules: ["gotidy", "modulesvendor"],
|
||||||
|
|
||||||
@@ -62,6 +62,30 @@ local gocache = [
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
for appID in appIDs
|
for appID in appIDs
|
||||||
|
} + {
|
||||||
|
check: ["test", "lint"],
|
||||||
|
|
||||||
|
test: {
|
||||||
|
from: "gobase",
|
||||||
|
workdir: "/app",
|
||||||
|
cache: gocache,
|
||||||
|
command: "go test ./..."
|
||||||
|
},
|
||||||
|
|
||||||
|
lint: {
|
||||||
|
from: images.golangcilint,
|
||||||
|
workdir: "/app",
|
||||||
|
cache: gocache,
|
||||||
|
copy: [
|
||||||
|
copyFrom("gosources", "/app", "/app"),
|
||||||
|
copy(".golangci.yml", ".golangci.yml"),
|
||||||
|
],
|
||||||
|
env: {
|
||||||
|
GOCACHE: "/app/cache/go-build",
|
||||||
|
GOLANGCI_LINT_CACHE: "/app/cache/go-build",
|
||||||
|
},
|
||||||
|
command: "golangci-lint run"
|
||||||
|
},
|
||||||
} + {
|
} + {
|
||||||
gobase: {
|
gobase: {
|
||||||
from: images.gobuilder,
|
from: images.gobuilder,
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
gobuilder: "golang:1.24.2"
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user