Skip to content

Prepare release v0.146.0 #1745

Prepare release v0.146.0

Prepare release v0.146.0 #1745

name: build-and-test
on:
push:
branches: [main]
tags:
- "v[0-9]+.[0-9]+.[0-9]+*"
pull_request:
env:
GO_VERSION: 1.25.7
jobs:
setup-environment:
timeout-minutes: 30
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v4
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v5
with:
go-version: ${{ env.GO_VERSION }}
cache: false
- name: Cache Go
id: go-cache
timeout-minutes: 5
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4
with:
path: |
~/go/bin
~/go/pkg/mod
./.tools
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
- name: Install dependencies
if: steps.go-cache.outputs.cache-hit != 'true'
run: make -j2 gomoddownload
- name: Install Tools
if: steps.go-cache.outputs.cache-hit != 'true'
run: make goinstall-tools
checks:
runs-on: ubuntu-24.04
needs: [setup-environment]
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v4
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v5
with:
go-version: ${{ env.GO_VERSION }}
cache: false
- name: Cache Go
id: go-cache
timeout-minutes: 5
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4
with:
path: |
~/go/bin
~/go/pkg/mod
./.tools
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
- name: Install dependencies
if: steps.go-cache.outputs.cache-hit != 'true'
run: make -j2 gomoddownload
- name: Install Tools
if: steps.go-cache.outputs.cache-hit != 'true'
run: make goinstall-tools
- name: Check for go mod dependency changes
run: |
make tidy-all
git diff --exit-code || (echo 'go.mod/go.sum deps changes detected, please run "make tidy-all" and commit the changes in this PR.' && exit 1)
- name: Check for vulnerabilities
run: |
make govulncheck-all
- name: Check for gofmt failures
run: |
make gofmt-all
git diff --exit-code || (echo 'Go code is not formatted, please run "make gofmt-all" and commit the changes in this PR.' && exit 1)
- name: Check for lint failures
run: |
make golint-all