Skip to content

Commit 236cff3

Browse files
committed
feat: test vectors CI test workflow
Add a new workflow that checks if the test vectors in the test folder match the ones in the CFRG spec.
1 parent 5cfb48e commit 236cff3

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/test-vectors.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Verify Test Vectors
2+
3+
on:
4+
push:
5+
paths:
6+
- 'src/tests/spec/vectors/*.json'
7+
pull_request:
8+
paths:
9+
- 'src/tests/spec/vectors/*.json'
10+
workflow_dispatch:
11+
schedule:
12+
- cron: '0 0 * * 0'
13+
14+
jobs:
15+
verify-checksums:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- run: |
20+
curl -sL https://raw.githubusercontent.com/mmaker/draft-irtf-cfrg-sigma-protocols/main/poc/vectors/duplexSpongeVectors.json -o /tmp/duplexSpongeVectors.json
21+
[ "$(sha256sum src/tests/spec/vectors/duplexSpongeVectors.json | cut -d' ' -f1)" = "$(sha256sum /tmp/duplexSpongeVectors.json | cut -d' ' -f1)" ] || exit 1
22+
curl -sL https://raw.githubusercontent.com/mmaker/draft-irtf-cfrg-sigma-protocols/main/poc/vectors/testSigmaProtocols.json -o /tmp/testSigmaProtocols.json
23+
[ "$(sha256sum src/tests/spec/vectors/testSigmaProtocols.json | cut -d' ' -f1)" = "$(sha256sum /tmp/testSigmaProtocols.json | cut -d' ' -f1)" ] || exit 1

0 commit comments

Comments
 (0)