Update how Mockery mocks are checked for currency. (#8697)

The use of "go install" is deprecated as a way of installing and running the
Mockery binary. Update the runner script to depend on an ambient version of the
tool and ensure that in CI it's installed.
This commit is contained in:
M. J. Fromberger
2022-06-03 15:02:04 -07:00
committed by GitHub
parent 75a12ea0c6
commit 48ec78e672
2 changed files with 16 additions and 1 deletions

View File

@@ -25,6 +25,9 @@ jobs:
- name: "Check generated mocks"
run: |
set -euo pipefail
readonly MOCKERY=2.12.3 # N.B. no leading "v"
curl -sL "https://github.com/vektra/mockery/releases/download/v${MOCKERY}/mockery_${MOCKERY}_Linux_x86_64.tar.gz" | tar -C /usr/local/bin -xzf -
make mockery 2>/dev/null
if ! git diff --stat --exit-code ; then