Skip to content

Commit 5d248a0

Browse files
committed
Run Go module configuration sync check also on docsgen module
The `check-config` job of the "Check Go" workflow runs a check to see whether there were any missed updates to the `go.mod` and `go.sum` files. Previously, this was only done for the main module. But there is an additional module for generating the website's command reference content the update of which might easily be overlooked. The CI check was not applied to this module, which could allow its metadata to get out of date. The use of a job matrix allows the workflow to easily accomodate the future addition of more modules to the repository by simply adding their path to the matrix array.
1 parent 8ec1138 commit 5d248a0

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

.github/workflows/check-go-task.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ on:
1111
paths:
1212
- ".github/workflows/check-go-task.ya?ml"
1313
- "Taskfile.ya?ml"
14-
- "go.mod"
15-
- "go.sum"
14+
- "**/go.mod"
15+
- "**/go.sum"
1616
- "**.go"
1717
pull_request:
1818
paths:
1919
- ".github/workflows/check-go-task.ya?ml"
2020
- "Taskfile.ya?ml"
21-
- "go.mod"
22-
- "go.sum"
21+
- "**/go.mod"
22+
- "**/go.sum"
2323
- "**.go"
2424
workflow_dispatch:
2525
repository_dispatch:
@@ -119,8 +119,17 @@ jobs:
119119
run: git diff --color --exit-code
120120

121121
check-config:
122+
name: check-config (${{ matrix.module.path }})
122123
runs-on: ubuntu-latest
123124

125+
strategy:
126+
fail-fast: false
127+
128+
matrix:
129+
module:
130+
- path: ./
131+
- path: docsgen
132+
124133
steps:
125134
- name: Checkout repository
126135
uses: actions/checkout@v2
@@ -131,6 +140,7 @@ jobs:
131140
go-version: ${{ env.GO_VERSION }}
132141

133142
- name: Run go mod tidy
143+
working-directory: ${{ matrix.module.path }}
134144
run: go mod tidy
135145

136146
- name: Check whether any tidying was needed

0 commit comments

Comments
 (0)