1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2026-06-03 18:35:08 +02:00

ci: add govulncheck job to CI workflow and update lint target (#7971)

Move govulncheck as a seperate job so that it does not block critical
PRs and releasing.
This commit is contained in:
Robert Pająk
2026-02-28 19:59:42 +01:00
committed by GitHub
parent 988a625a10
commit 707898761b
2 changed files with 33 additions and 1 deletions
+32
View File
@@ -52,6 +52,38 @@ jobs:
run: make build
- name: Check clean repository
run: make check-clean-work-tree
govulncheck:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0 ## Needed for "Set internal/tools/go.mod timestamp" step.
- name: Install Go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version: ${{ env.DEFAULT_GO_VERSION }}
check-latest: true
cache-dependency-path: "**/go.sum"
- name: Tools cache
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
env:
cache-name: go-tools-cache
with:
path: .tools
key: ${{ runner.os }}-${{ env.DEFAULT_GO_VERSION }}-${{ env.cache-name }}-${{ hashFiles('./internal/tools/**') }}
# The step below is needed to not rebuild all the build tools.
- name: Set internal/tools/go.mod timestamp
run: |
filename="internal/tools/go.mod"
unixtime=$(git log -1 --format="%at" -- "${filename}")
touchtime=$(date -d @$unixtime +'%Y%m%d%H%M.%S')
touch -t ${touchtime} "${filename}"
ls -la --time-style=full-iso "${filename}"
- name: Run govulncheck
run: make govulncheck
test-bench:
runs-on: ubuntu-latest
steps:
+1 -1
View File
@@ -215,7 +215,7 @@ go-mod-tidy/%: crosslink
&& $(GO) mod tidy -compat=1.21
.PHONY: lint
lint: misspell go-mod-tidy golangci-lint govulncheck
lint: misspell go-mod-tidy golangci-lint
.PHONY: vanity-import-check
vanity-import-check: $(PORTO)