From 236cff3a66bba35af9fc6dc0738b61a68ff8a9a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michele=20Orr=C3=B9?= Date: Mon, 22 Sep 2025 16:16:53 +0200 Subject: [PATCH] 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. --- .github/workflows/test-vectors.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/test-vectors.yml diff --git a/.github/workflows/test-vectors.yml b/.github/workflows/test-vectors.yml new file mode 100644 index 0000000..65e3777 --- /dev/null +++ b/.github/workflows/test-vectors.yml @@ -0,0 +1,23 @@ +name: Verify Test Vectors + +on: + push: + paths: + - 'src/tests/spec/vectors/*.json' + pull_request: + paths: + - 'src/tests/spec/vectors/*.json' + workflow_dispatch: + schedule: + - cron: '0 0 * * 0' + +jobs: + verify-checksums: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: | + curl -sL https://raw.githubusercontent.com/mmaker/draft-irtf-cfrg-sigma-protocols/main/poc/vectors/duplexSpongeVectors.json -o /tmp/duplexSpongeVectors.json + [ "$(sha256sum src/tests/spec/vectors/duplexSpongeVectors.json | cut -d' ' -f1)" = "$(sha256sum /tmp/duplexSpongeVectors.json | cut -d' ' -f1)" ] || exit 1 + curl -sL https://raw.githubusercontent.com/mmaker/draft-irtf-cfrg-sigma-protocols/main/poc/vectors/testSigmaProtocols.json -o /tmp/testSigmaProtocols.json + [ "$(sha256sum src/tests/spec/vectors/testSigmaProtocols.json | cut -d' ' -f1)" = "$(sha256sum /tmp/testSigmaProtocols.json | cut -d' ' -f1)" ] || exit 1 \ No newline at end of file