From d1751459ee615d10d7786e45e5e70522bf3c27c0 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Wed, 21 Jun 2023 15:38:40 +0200 Subject: [PATCH] make+GitHub: assert test vectors are updated --- .github/workflows/main.yaml | 13 +++++++++++++ Makefile | 5 +++++ 2 files changed, 18 insertions(+) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index de23b6e96..d49f48341 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -61,6 +61,19 @@ jobs: - name: Run go mod tidy run: make mod-check + test-vector-check: + name: test vector check + runs-on: ubuntu-latest + steps: + - name: git checkout + uses: actions/checkout@v3 + + - name: Setup go environment + uses: ./.github/actions/setup-go + + - name: Run test vector creation check + run: make test-vector-check + ######################## # Compilation check. ######################## diff --git a/Makefile b/Makefile index 8fe033afd..68c7d1543 100644 --- a/Makefile +++ b/Makefile @@ -259,6 +259,11 @@ mod-check: mod-tidy @$(call print, "Checking modules.") if test -n "$$(git status | grep -e "go.mod\|go.sum")"; then echo "Running go mod tidy changes go.mod/go.sum"; git status; git diff; exit 1; fi +test-vector-check: + @$(call print, "Checking test vectors.") + make unit gen-test-vectors=true + if test -n "$$(git status | grep -e ".json")"; then echo "Test vectors not updated"; git status; git diff; exit 1; fi + clean: @$(call print, "Cleaning source.$(NC)") $(RM) coverage.txt