Skip to content

Update module golang.org/x/tools to v0.31.0 #1083

Update module golang.org/x/tools to v0.31.0

Update module golang.org/x/tools to v0.31.0 #1083

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags:
- "v[0-9]+.[0-9]+.[0-9]+*"
pull_request:
branches:
- "**"
defaults:
run:
shell: bash
concurrency:
group: ${{ github.ref_name }}-ci
cancel-in-progress: true
permissions:
contents: read
jobs:
vars:
name: Checks and variables
runs-on: ubuntu-24.04
permissions:
contents: write
pull-requests: read
steps:
- name: Checkout Repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.NGINX_PAT }}
- name: Setup Golang Environment
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: stable
# this can be removed once https://github.com/renovatebot/renovate/issues/12999 is implemented
- name: Update files for renovate
run: |
cd tests && go mod tidy && go mod verify
if: ${{ github.actor == 'renovate[bot]' }}
- name: Commit changes
id: commit
uses: stefanzweifel/git-auto-commit-action@e348103e9026cc0eee72ae06630dbe30c8bf7a79 # v5.1.0
with:
commit_message: "Update files for renovate"
if: ${{ github.actor == 'renovate[bot]' }}
- name: Check if go.mod and go.sum are up to date
run: go mod tidy && git diff --exit-code -- go.mod go.sum
- name: Check if generated go files are up to date
run: make generate && git diff --exit-code
unit-tests:
name: Unit Tests
runs-on: ubuntu-24.04
needs: vars
steps:
- name: Checkout Repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Golang Environment
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: stable
- name: Run Tests
run: make unit-test
- name: Upload Coverage Report
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
with:
name: cover-${{ github.run_id }}.html
path: |
${{ github.workspace }}/cover.html
${{ github.workspace }}/generator-cover.html
if: always()
functional-tests:
name: Functional Tests
runs-on: ubuntu-24.04
needs: vars
steps:
- name: Checkout Repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Golang Environment
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: stable
- name: Run Functional Tests
run: make functional-test
release-notes:
name: Release Notes
runs-on: ubuntu-24.04
permissions:
contents: write
issues: write
if: github.event_name != 'pull_request'
steps:
- name: Checkout Repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Create/Update Draft
uses: lucacome/draft-release@9e620cf75275b925cc44df78f13f4061f3190693 # v1.2.1
id: release-notes
with:
minor-label: "enhancement"
major-label: "change"
publish: ${{ github.ref_type == 'tag' }}
collapse-after: 30
- name: Setup Golang Environment
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: stable
if: ${{ github.ref_type == 'tag' }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@90a3faa9d0182683851fbfa97ca1a2cb983bfca3 # v6.2.1
with:
version: v2.7.0 # renovate: datasource=github-tags depName=goreleaser/goreleaser
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ github.ref_type == 'tag' }}