2ed2c6c002
Include the Defaults.gitlab-ci.yml in the CI configuration to enhance the pipeline structure and ensure consistency across projects. This change improves the organization of CI files and helps maintain clarity in the workflow setup.
39 lines
1.1 KiB
YAML
39 lines
1.1 KiB
YAML
include:
|
|
- template: 'Workflows/MergeRequest-Pipelines.gitlab-ci.yml'
|
|
- project: unboundsoftware/ci-templates
|
|
file: Defaults.gitlab-ci.yml
|
|
- project: unboundsoftware/ci-templates
|
|
file: Release.gitlab-ci.yml
|
|
- project: unboundsoftware/ci-templates
|
|
file: Pre-Commit-Go.gitlab-ci.yml
|
|
|
|
image: amd64/golang:1.24.2@sha256:bf7899c8be72a3edea21ba81f3d826306205e6de84c57d6d7d2da3e447d728e8
|
|
|
|
stages:
|
|
- deps
|
|
- test
|
|
|
|
deps:
|
|
stage: deps
|
|
script:
|
|
- go mod download
|
|
|
|
test:
|
|
stage: test
|
|
dependencies:
|
|
- deps
|
|
script:
|
|
- CGO_ENABLED=1 go test -mod=readonly -race -coverprofile=coverage.txt -covermode=atomic -coverpkg=$(go list ./... | tr '\n' , | sed 's/,$//') ./...
|
|
- go tool cover -html=coverage.txt -o coverage.html
|
|
- go tool cover -func=coverage.txt
|
|
- curl -Os https://uploader.codecov.io/latest/linux/codecov
|
|
- chmod +x codecov
|
|
- ./codecov -t ${CODECOV_TOKEN} -R $CI_PROJECT_DIR -C $CI_COMMIT_SHA -r $CI_PROJECT_PATH
|
|
|
|
vulnerabilities:
|
|
stage: test
|
|
image: amd64/golang:1.24.2@sha256:bf7899c8be72a3edea21ba81f3d826306205e6de84c57d6d7d2da3e447d728e8
|
|
script:
|
|
- go install golang.org/x/vuln/cmd/govulncheck@latest
|
|
- govulncheck ./...
|