Skip to content

Merge pull request #616 from vitessio/fix-profile-modes #2336

Merge pull request #616 from vitessio/fix-profile-modes

Merge pull request #616 from vitessio/fix-profile-modes #2336

Workflow file for this run

name: Golang Tidy
on: [push, pull_request]
jobs:
build:
name: Check go mod tidy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.23.0
# https://github.com/vitessio/vitess/blob/b5177cd4d09f661350137ef46de2bd3e27949d2e/.github/workflows/gomod-tidy.yml#L17-L28
- name: Run go mod tidy
run: |
set -e
go mod tidy
output=$(git status -s)
if [ -z "${output}" ]; then
exit 0
fi
echo 'We wish to maintain a tidy state for go mod. Please run `go mod tidy` on your branch, commit and push again.'
echo 'Running `go mod tidy` on this CI test yields with the following changes:'
echo "$output"
exit 1