Skip to content

Commit

Permalink
Test go.mod
Browse files Browse the repository at this point in the history
  • Loading branch information
sevein committed Sep 4, 2024
1 parent d71e0ae commit 912facd
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,27 @@ jobs:
uses: golangci/golangci-lint-action@v6
with:
install-mode: "binary"
tidy:
if: github.event_name == 'pull_request'
runs-on: ubuntu-22.04
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v5
- name: Check go.mod
run: |
go mod download
go mod tidy
if [ ! -z "$(git status --porcelain go.mod)" ]; then
printf "go.mod has modifications\n"
git diff go.mod
exit 1
fi
if [ ! -z "$(git status --porcelain go.sum)" ]; then
printf "go.sum has modifications\n"
git diff go.sum
exit 1
fi

0 comments on commit 912facd

Please sign in to comment.