Skip to content

Commit 2838ad1

Browse files
authored
ci: add workflow to ensure go.mod files are tidied (#3025)
<!-- please provide a detailed description of the changes made in this pull request. --> <details><summary>Contributors' checklist...</summary> - [ ] Added new tests, or not needed, or not feasible - [ ] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [ ] Updated the official documentation or not needed - [ ] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [ ] Added references to related issues and PRs - [ ] Provided any useful hints for running manual tests </details>
1 parent cfbaff2 commit 2838ad1

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

.github/workflows/mod-tidy.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Ensure go.mods are tidied
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
workflow_dispatch:
8+
pull_request:
9+
10+
jobs:
11+
main:
12+
name: Ensure go.mods are tidied
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Install Go
16+
uses: actions/setup-go@v5
17+
with:
18+
go-version: ${{ inputs.go-version }}
19+
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
23+
- name: Check go.mod files are up to date
24+
working-directory: ${{ inputs.modulepath }}
25+
run: |
26+
make tidy VERIFY_GO_SUMS=true
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// This file ensures there is at least one go file in this dir at all times.
2+
3+
package proto3

0 commit comments

Comments
 (0)