Skip to content

Commit

Permalink
add check-mocks github workflow (#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
samlaf authored Jun 10, 2024
1 parent 4a204d0 commit 60b4426
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/check-mocks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: check mocks up-to-date
on:
push:
branches:
- master
pull_request:

permissions:
contents: read

jobs:
make-mocks:
name: make mocks and check for diffs
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v4

- name: install go1.21
uses: actions/setup-go@v5
with:
go-version: "1.21"

- name: run make mocks and check for diffs
run: |
make mocks
if [ ! -z "$(git status --porcelain)" ]; then
printf "Current generated mocks not up to date\n"
git diff
git status
exit 1
fi

0 comments on commit 60b4426

Please sign in to comment.