test: extract go bin
This commit is contained in:
+1
-6
@@ -5,7 +5,6 @@ linters:
|
|||||||
disable:
|
disable:
|
||||||
- contextcheck # FIXME: causes panic in graph service
|
- contextcheck # FIXME: causes panic in graph service
|
||||||
- lll # 760 issues in the codebase
|
- lll # 760 issues in the codebase
|
||||||
- exhaustivestruct
|
|
||||||
- exhaustruct
|
- exhaustruct
|
||||||
- exhaustive # 634 issues in the codebase
|
- exhaustive # 634 issues in the codebase
|
||||||
- wrapcheck # 398 issues in the codebase
|
- wrapcheck # 398 issues in the codebase
|
||||||
@@ -16,14 +15,12 @@ linters:
|
|||||||
- forbidigo
|
- forbidigo
|
||||||
- gochecknoglobals
|
- gochecknoglobals
|
||||||
- nlreturn
|
- nlreturn
|
||||||
- nosnakecase # each 100-200 issues in codebase
|
|
||||||
- gci
|
- gci
|
||||||
- godot
|
- godot
|
||||||
- funlen
|
- funlen
|
||||||
- gomnd
|
|
||||||
- gofumpt
|
- gofumpt
|
||||||
- ireturn
|
- ireturn
|
||||||
- goerr113
|
- err113
|
||||||
- containedctx
|
- containedctx
|
||||||
- paralleltest
|
- paralleltest
|
||||||
- gocritic # each 50-100 issues in codebase
|
- gocritic # each 50-100 issues in codebase
|
||||||
@@ -31,8 +28,6 @@ linters:
|
|||||||
- cyclop
|
- cyclop
|
||||||
- noctx
|
- noctx
|
||||||
- testpackage
|
- testpackage
|
||||||
- maligned
|
|
||||||
- golint
|
|
||||||
- forcetypeassert
|
- forcetypeassert
|
||||||
- nonamedreturns
|
- nonamedreturns
|
||||||
- dupl
|
- dupl
|
||||||
|
|||||||
-12
@@ -67,18 +67,6 @@ fmt:
|
|||||||
@echo "- $(NAME): fmt"
|
@echo "- $(NAME): fmt"
|
||||||
gofmt -s -w $(SOURCES)
|
gofmt -s -w $(SOURCES)
|
||||||
|
|
||||||
.PHONY: golangci-lint-fix
|
|
||||||
golangci-lint-fix: $(GOLANGCI_LINT)
|
|
||||||
$(GOLANGCI_LINT) run $(LINTERS) --fix
|
|
||||||
|
|
||||||
.PHONY: golangci-lint
|
|
||||||
golangci-lint: $(GOLANGCI_LINT)
|
|
||||||
$(GOLANGCI_LINT) run --path-prefix services/$(NAME)
|
|
||||||
|
|
||||||
.PHONY: ci-golangci-lint
|
|
||||||
ci-golangci-lint: $(GOLANGCI_LINT)
|
|
||||||
$(GOLANGCI_LINT) run --path-prefix services/$(NAME) --timeout 15m0s --issues-exit-code 0 --out-format checkstyle > checkstyle.xml
|
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test:
|
test:
|
||||||
@go test -v -tags '$(TAGS)' -coverprofile coverage.out ./...
|
@go test -v -tags '$(TAGS)' -coverprofile coverage.out ./...
|
||||||
|
|||||||
+12
-19
@@ -418,8 +418,14 @@ def main(ctx):
|
|||||||
|
|
||||||
build_release_helpers = \
|
build_release_helpers = \
|
||||||
changelog() + \
|
changelog() + \
|
||||||
docs() + \
|
docs()
|
||||||
licenseCheck(ctx)
|
|
||||||
|
build_release_helpers.append(
|
||||||
|
pipelineDependsOn(
|
||||||
|
licenseCheck(ctx),
|
||||||
|
getGoBinForTesting(ctx),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
test_pipelines = \
|
test_pipelines = \
|
||||||
codestyle(ctx) + \
|
codestyle(ctx) + \
|
||||||
@@ -1741,20 +1747,9 @@ def binaryRelease(ctx, arch, build_type, target, depends_on = []):
|
|||||||
}
|
}
|
||||||
|
|
||||||
def licenseCheck(ctx):
|
def licenseCheck(ctx):
|
||||||
# uploads third-party-licenses to https://download.owncloud.com/ocis/ocis/daily/
|
return {
|
||||||
target = "/ocis/%s/daily" % (ctx.repo.name.replace("ocis-", ""))
|
|
||||||
if ctx.build.event == "tag":
|
|
||||||
# uploads third-party-licenses to eg. https://download.owncloud.com/ocis/ocis/1.0.0-beta9/
|
|
||||||
folder = "stable"
|
|
||||||
buildref = ctx.build.ref.replace("refs/tags/v", "")
|
|
||||||
buildref = buildref.lower()
|
|
||||||
if buildref.find("-") != -1: # "x.x.x-alpha", "x.x.x-beta", "x.x.x-rc"
|
|
||||||
folder = "testing"
|
|
||||||
target = "/ocis/%s/%s/%s" % (ctx.repo.name.replace("ocis-", ""), folder, buildref)
|
|
||||||
|
|
||||||
return [{
|
|
||||||
"name": "check-licenses",
|
"name": "check-licenses",
|
||||||
"steps": [
|
"steps": restoreGoBinCache() + [
|
||||||
{
|
{
|
||||||
"name": "node-check-licenses",
|
"name": "node-check-licenses",
|
||||||
"image": OC_CI_NODEJS % DEFAULT_NODEJS_VERSION,
|
"image": OC_CI_NODEJS % DEFAULT_NODEJS_VERSION,
|
||||||
@@ -1840,7 +1835,7 @@ def licenseCheck(ctx):
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
"workspace": workspace,
|
"workspace": workspace,
|
||||||
}]
|
}
|
||||||
|
|
||||||
def releaseDockerManifest(ctx, repo, build_type):
|
def releaseDockerManifest(ctx, repo, build_type):
|
||||||
spec = "manifest.tmpl"
|
spec = "manifest.tmpl"
|
||||||
@@ -2503,10 +2498,8 @@ def genericCachePurge(flush_path):
|
|||||||
{
|
{
|
||||||
"event": "pull_request",
|
"event": "pull_request",
|
||||||
},
|
},
|
||||||
# {
|
|
||||||
# "status": ["success", "failure"]
|
|
||||||
# },
|
|
||||||
],
|
],
|
||||||
|
"runs_on": ["failure"],
|
||||||
}
|
}
|
||||||
|
|
||||||
def genericBuildArtifactCache(ctx, name, action, path):
|
def genericBuildArtifactCache(ctx, name, action, path):
|
||||||
|
|||||||
@@ -213,20 +213,16 @@ protobuf:
|
|||||||
done
|
done
|
||||||
|
|
||||||
.PHONY: golangci-lint
|
.PHONY: golangci-lint
|
||||||
golangci-lint:
|
golangci-lint: $(GOLANGCI_LINT)
|
||||||
@for mod in $(OC_MODULES); do \
|
$(GOLANGCI_LINT) run --modules-download-mode vendor --timeout 15m0s --issues-exit-code 0 --out-format checkstyle > checkstyle.xml
|
||||||
$(MAKE) --no-print-directory -C $$mod golangci-lint; \
|
|
||||||
done
|
|
||||||
|
|
||||||
.PHONY: ci-golangci-lint
|
.PHONY: ci-golangci-lint
|
||||||
ci-golangci-lint: $(GOLANGCI_LINT)
|
ci-golangci-lint:
|
||||||
$(GOLANGCI_LINT) run --modules-download-mode vendor --timeout 15m0s --issues-exit-code 0 --out-format checkstyle > checkstyle.xml
|
$(GOLANGCI_LINT) run --modules-download-mode vendor --timeout 15m0s --issues-exit-code 0 --out-format checkstyle > checkstyle.xml
|
||||||
|
|
||||||
.PHONY: golangci-lint-fix
|
.PHONY: golangci-lint-fix
|
||||||
golangci-lint-fix:
|
golangci-lint-fix: $(GOLANGCI_LINT)
|
||||||
@for mod in $(OC_MODULES); do \
|
$(GOLANGCI_LINT) run --fix --modules-download-mode vendor --timeout 15m0s --issues-exit-code 0 --out-format checkstyle > checkstyle.xml
|
||||||
$(MAKE) --no-print-directory -C $$mod golangci-lint-fix; \
|
|
||||||
done
|
|
||||||
|
|
||||||
.PHONY: test-gherkin-lint
|
.PHONY: test-gherkin-lint
|
||||||
test-gherkin-lint:
|
test-gherkin-lint:
|
||||||
@@ -241,13 +237,13 @@ bingo-update: $(BINGO)
|
|||||||
$(BINGO) get -l -v -t 20
|
$(BINGO) get -l -v -t 20
|
||||||
|
|
||||||
.PHONY: check-licenses
|
.PHONY: check-licenses
|
||||||
check-licenses: ci-go-check-licenses ci-node-check-licenses
|
check-licenses: $(GO_LICENSES) ci-go-check-licenses ci-node-check-licenses
|
||||||
|
|
||||||
.PHONY: save-licenses
|
.PHONY: save-licenses
|
||||||
save-licenses: ci-go-save-licenses ci-node-save-licenses
|
save-licenses: $(GO_LICENSES) ci-go-save-licenses ci-node-save-licenses
|
||||||
|
|
||||||
.PHONY: ci-go-check-licenses
|
.PHONY: ci-go-check-licenses
|
||||||
ci-go-check-licenses: $(GO_LICENSES)
|
ci-go-check-licenses:
|
||||||
$(GO_LICENSES) check ./...
|
$(GO_LICENSES) check ./...
|
||||||
|
|
||||||
.PHONY: ci-node-check-licenses
|
.PHONY: ci-node-check-licenses
|
||||||
@@ -257,7 +253,7 @@ ci-node-check-licenses:
|
|||||||
done
|
done
|
||||||
|
|
||||||
.PHONY: ci-go-save-licenses
|
.PHONY: ci-go-save-licenses
|
||||||
ci-go-save-licenses: $(GO_LICENSES)
|
ci-go-save-licenses:
|
||||||
@mkdir -p ./third-party-licenses/go/opencloud/third-party-licenses
|
@mkdir -p ./third-party-licenses/go/opencloud/third-party-licenses
|
||||||
$(GO_LICENSES) csv ./... > ./third-party-licenses/go/opencloud/third-party-licenses.csv
|
$(GO_LICENSES) csv ./... > ./third-party-licenses/go/opencloud/third-party-licenses.csv
|
||||||
$(GO_LICENSES) save ./... --force --save_path="./third-party-licenses/go/opencloud/third-party-licenses"
|
$(GO_LICENSES) save ./... --force --save_path="./third-party-licenses/go/opencloud/third-party-licenses"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Code generated by mockery v2.53.0. DO NOT EDIT.
|
// Code generated by mockery v2.53.2. DO NOT EDIT.
|
||||||
|
|
||||||
package mocks
|
package mocks
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Code generated by mockery v2.53.0. DO NOT EDIT.
|
// Code generated by mockery v2.53.2. DO NOT EDIT.
|
||||||
|
|
||||||
package mocks
|
package mocks
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Code generated by mockery v2.53.0. DO NOT EDIT.
|
// Code generated by mockery v2.53.2. DO NOT EDIT.
|
||||||
|
|
||||||
package mocks
|
package mocks
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Code generated by mockery v2.53.0. DO NOT EDIT.
|
// Code generated by mockery v2.53.2. DO NOT EDIT.
|
||||||
|
|
||||||
package mocks
|
package mocks
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Code generated by mockery v2.53.0. DO NOT EDIT.
|
// Code generated by mockery v2.53.2. DO NOT EDIT.
|
||||||
|
|
||||||
package mocks
|
package mocks
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Code generated by mockery v2.53.0. DO NOT EDIT.
|
// Code generated by mockery v2.53.2. DO NOT EDIT.
|
||||||
|
|
||||||
package mocks
|
package mocks
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ include ../../.make/release.mk
|
|||||||
include ../../.make/docs.mk
|
include ../../.make/docs.mk
|
||||||
|
|
||||||
.PHONY: go-generate
|
.PHONY: go-generate
|
||||||
go-generate: $(MOCKERY)
|
go-generate:
|
||||||
$(MOCKERY)
|
$(MOCKERY)
|
||||||
|
|
||||||
.PHONY: l10n-pull
|
.PHONY: l10n-pull
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Code generated by mockery v2.53.0. DO NOT EDIT.
|
// Code generated by mockery v2.53.2. DO NOT EDIT.
|
||||||
|
|
||||||
package mocks
|
package mocks
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Code generated by mockery v2.53.0. DO NOT EDIT.
|
// Code generated by mockery v2.53.2. DO NOT EDIT.
|
||||||
|
|
||||||
package mocks
|
package mocks
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Code generated by mockery v2.53.0. DO NOT EDIT.
|
// Code generated by mockery v2.53.2. DO NOT EDIT.
|
||||||
|
|
||||||
package mocks
|
package mocks
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Code generated by mockery v2.53.0. DO NOT EDIT.
|
// Code generated by mockery v2.53.2. DO NOT EDIT.
|
||||||
|
|
||||||
package mocks
|
package mocks
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Code generated by mockery v2.53.0. DO NOT EDIT.
|
// Code generated by mockery v2.53.2. DO NOT EDIT.
|
||||||
|
|
||||||
package mocks
|
package mocks
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Code generated by mockery v2.53.0. DO NOT EDIT.
|
// Code generated by mockery v2.53.2. DO NOT EDIT.
|
||||||
|
|
||||||
package mocks
|
package mocks
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Code generated by mockery v2.53.0. DO NOT EDIT.
|
// Code generated by mockery v2.53.2. DO NOT EDIT.
|
||||||
|
|
||||||
package mocks
|
package mocks
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Code generated by mockery v2.53.0. DO NOT EDIT.
|
// Code generated by mockery v2.53.2. DO NOT EDIT.
|
||||||
|
|
||||||
package mocks
|
package mocks
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Code generated by mockery v2.53.0. DO NOT EDIT.
|
// Code generated by mockery v2.53.2. DO NOT EDIT.
|
||||||
|
|
||||||
package mocks
|
package mocks
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Code generated by mockery v2.53.0. DO NOT EDIT.
|
// Code generated by mockery v2.53.2. DO NOT EDIT.
|
||||||
|
|
||||||
package mocks
|
package mocks
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Code generated by mockery v2.53.0. DO NOT EDIT.
|
// Code generated by mockery v2.53.2. DO NOT EDIT.
|
||||||
|
|
||||||
package mocks
|
package mocks
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Code generated by mockery v2.53.0. DO NOT EDIT.
|
// Code generated by mockery v2.53.2. DO NOT EDIT.
|
||||||
|
|
||||||
package mocks
|
package mocks
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Code generated by mockery v2.53.0. DO NOT EDIT.
|
// Code generated by mockery v2.53.2. DO NOT EDIT.
|
||||||
|
|
||||||
package mocks
|
package mocks
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Code generated by mockery v2.53.0. DO NOT EDIT.
|
// Code generated by mockery v2.53.2. DO NOT EDIT.
|
||||||
|
|
||||||
package mocks
|
package mocks
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user