Skip to content

Commit

Permalink
Merge remote-tracking branch 'nokia/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
5nord committed Oct 24, 2024
2 parents cdf964f + 95a12e7 commit 23f8d22
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 26 deletions.
41 changes: 33 additions & 8 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,21 @@ default:
tags:
- k3-nks-tiny

image: k3-local.artifactory-espoo2.int.net.nokia.com/k3ci/default:latest
image: $NKS_DOCKER_K3_REGISTRY_LOCAL/k3ci/default:latest

include:
- project: 'k3/k3ci'
ref: "master"
file: "/gitlab/templates/nks/container-resources-template.yml"
- project: 'k3/k3ci'
ref: "master"
file: "/gitlab/templates/ntt/test-template-tiny.yml"
- project: 'k3/k3ci'
ref: "master"
file: "/gitlab/templates/ntt/test-template-medium.yml"
- project: 'k3/k3ci'
ref: "master"
file: "/gitlab/templates/ntt/deploy-template-tiny.yml"

variables:
XCACHE: "/xcache"
Expand All @@ -26,14 +40,18 @@ stages:

golang:1.20:
stage: test
image: golang:1.20
image: $NKS_DOCKER_IO_REGISTRY_MIRROR/golang:1.20
extends:
- .ntt:test-template-medium
script:
- go test ./...

golang:latest:
stage: test
image: golang:latest
extends: .go-cache
image: $NKS_DOCKER_IO_REGISTRY_MIRROR/golang:latest
extends:
- .go-cache
- .ntt:test-template-medium
script:
- go install gotest.tools/gotestsum@latest
- $GOPATH/bin/gotestsum --junitfile report-junit.xml --format testname -- -race ./...
Expand All @@ -43,8 +61,10 @@ golang:latest:

coverage:
stage: test
image: golang:latest
extends: .go-cache
image: $NKS_DOCKER_IO_REGISTRY_MIRROR/golang:latest
extends:
- .go-cache
- .ntt:test-template-tiny
needs: []
script:
- go install github.com/boumenot/gocover-cobertura@latest
Expand All @@ -56,12 +76,15 @@ coverage:
coverage_report:
coverage_format: cobertura
path: report-coverage.xml

lint:
stage: test
image: golangci/golangci-lint:v1.59.1
image: $NKS_DOCKER_IO_REGISTRY_MIRROR/golangci/golangci-lint:v1.59.1
extends:
- .ntt:test-template-tiny
needs: []
script:
- golangci-lint run --color=always --issues-exit-code=0 --out-format=code-climate:report-lint.json,colored-line-number:stdout
- golangci-lint -v run --color=always --issues-exit-code=0 --out-format=code-climate:report-lint.json,colored-line-number:stdout
artifacts:
reports:
codequality: report-lint.json
Expand All @@ -79,6 +102,8 @@ trigger-k3:

update-k3:
stage: deploy
extends:
- .ntt:deploy-template-tiny
only:
refs:
- master
Expand Down
49 changes: 31 additions & 18 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,7 @@
run:
tests: false
exclude-dirs:
- internal/env
- internal/fs
- internal/loc
- internal/lsp/fakenet
- internal/lsp/helper
- internal/lsp/jsonrpc2
- internal/lsp/protocol
- internal/lsp/span
- internal/lsp/telemetry
- internal/lsp/xcontext
- internal/memoize
- internal/session/flock
- ttcn3/v2/syntax/internal/gen
- ttcn3/syntax/internal/gen
- ttcn3/printer
exclude-files:
- ".*_gen.go$"
concurrency: 0
timeout: 5m

output:
sort-results: true
Expand Down Expand Up @@ -61,3 +45,32 @@ linters-settings:
rules:
json: snake
yaml: snake

issues:
exclude-dirs:
- internal/env
- internal/fs
- internal/loc
- internal/lsp/fakenet
- internal/lsp/helper
- internal/lsp/jsonrpc2
- internal/lsp/protocol
- internal/lsp/span
- internal/lsp/telemetry
- internal/lsp/xcontext
- internal/memoize
- internal/session/flock
- ttcn3/v2/syntax/internal/gen
- ttcn3/syntax/internal/gen
- ttcn3/printer

exclude-files:
- ".*_gen.go$"

exclude-use-default: true
exclude-case-sensitive: true
exclude-dirs-use-default: true
max-issues-per-linter: 50
max-same-issues: 3
new: false
fix: false

0 comments on commit 23f8d22

Please sign in to comment.