From b6a3f91ccbdc1ce4ac7052003d4fddcdd9722df2 Mon Sep 17 00:00:00 2001 From: Samuel Laferriere Date: Sun, 9 Jun 2024 11:49:27 +0800 Subject: [PATCH] add workflow to check mocks are up-to-date --- .github/workflows/check-mocks.yml | 32 +++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/check-mocks.yml diff --git a/.github/workflows/check-mocks.yml b/.github/workflows/check-mocks.yml new file mode 100644 index 00000000..16bf1f5b --- /dev/null +++ b/.github/workflows/check-mocks.yml @@ -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 + runs-on: ubuntu-latest + steps: + - name: checkout EigenCert + uses: actions/checkout@v4 + + - name: install go1.21 + uses: actions/setup-go@v5 + with: + go-version: '1.21' + + - name: run make mocks + 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 \ No newline at end of file