Skip to content

Commit 8931371

Browse files
Verify "go mod tidy" in CI
Previously, there was no verification that it was possible to run "go mod tidy" and "go mod vendor" in projects that depend on errors. This commit adds a CI step to check that these "go mod" commands can run successfully.
1 parent fc43a0e commit 8931371

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,6 @@ jobs:
3030

3131
- name: Test (${{ matrix.go }})
3232
run: go test ./...
33+
34+
- name: Tidy (${{ matrix.go }})
35+
run: '[[ `go version` < "go version go1.15.10" ]] || go mod tidy'

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ older version of the package.
5858

5959
## How to use
6060

61+
This library works best with go ≥ 1.15.10. It works with 1.15.9 but breaks `go mod tidy` and `go mod vendor`.
62+
6163
- construct errors with `errors.New()`, etc as usual, but also see the other [error leaf constructors](#Available-error-leaves) below.
6264
- wrap errors with `errors.Wrap()` as usual, but also see the [other wrappers](#Available-wrapper-constructors) below.
6365
- test error identity with `errors.Is()` as usual.

0 commit comments

Comments
 (0)