From 168ffc5dca76158ab4ba6cda337529892385b26c Mon Sep 17 00:00:00 2001 From: Jesse Geens Date: Fri, 27 Sep 2024 09:18:16 +0200 Subject: [PATCH] Added mockery step in CI pipeline to automatically generate mocked interfaces for the Go target (#233) * Added mockery step in CI pipeline to automatically generate mocked interfaces for the Go target --------- Co-authored-by: Jesse Geens --- .github/workflows/build-and-publish.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index c11f09d..c4f9db3 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -24,8 +24,19 @@ jobs: touch /root/.ssh/known_hosts chmod 400 /root/.ssh/known_hosts ssh-keyscan -H github.com > /etc/ssh/ssh_known_hosts 2> /dev/null + - name: build-and-publish run: cs3apis-build -git-ssh -push-go -push-js -push-node -push-python + - name: run-mockery + run: | + cd build/go-cs3apis + git config user.email "cs3org-bot@hugo.labkode.com" + git config user.name "cs3org-bot" + go install github.com/vektra/mockery/v2@v2.40.0 # Later versions are incompatible with Go 1.21 + mockery + git add . + git commit -m 'Generated mock interfaces for https://github.com/cern-eos/grpc-proto/tree/${{ github.sha }}' + git push origin main - name: setup-buf uses: bufbuild/buf-setup-action@v1 - name: push-buf