-
-
Notifications
You must be signed in to change notification settings - Fork 7
31 lines (28 loc) · 996 Bytes
/
tidy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Ensure `go mod tidy` has been run
on: [ push, pull_request ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
fail-fast: false
# perform matrix testing to give us an earlier insight into issues with different versions of supported major versions of Go
matrix:
# strategy is used to allow us to pin to a specific Go version, or use the version available in our `go.mod`
strategy: ['go-version']
version: [1.21]
include:
# pick up the Go version from the `go.mod`
- strategy: 'go-version-file'
version: 'go.mod'
steps:
- name: Check out source code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v3
with:
${{ matrix.strategy }}: ${{ matrix.version }}
- name: Install `tidied`
run: go install gitlab.com/jamietanna/tidied@latest
- name: Check for no untracked files
run: tidied -verbose