Skip to content

Commit

Permalink
make+GitHub: assert test vectors are updated
Browse files Browse the repository at this point in the history
  • Loading branch information
guggero committed Jun 21, 2023
1 parent d54ede9 commit d175145
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
########################
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d175145

Please sign in to comment.