Skip to content

Commit

Permalink
chore: add go mod tidy lint step (#1434)
Browse files Browse the repository at this point in the history
* chore: add go mod tidy lint step

* fix(lint): use git-diff index to detect change

* chore: commiting untidy change to go mod to ensure lint fails

* revert: commiting untidy change to go mod to ensure lint fails"

This reverts commit 0138326.
  • Loading branch information
GeorgeMac authored Mar 23, 2023
1 parent 1c1b840 commit 20fa6b4
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,21 @@ jobs:
with:
input: "rpc/flipt"
against: "https://github.com/${GITHUB_REPOSITORY}.git#branch=main"

go-mod-tidy:
name: "Go Mod Tidy"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-go@v4
with:
go-version: "1.20"
check-latest: true
cache: true

- name: Run go mod tidy.
run: go mod tidy

- name: Ensure clean git state.
run: git diff-index --quiet HEAD -- || (echo "Please run go mod tidy." && exit 1)

0 comments on commit 20fa6b4

Please sign in to comment.