From 979b7870ee5d205e3ce893e2ac28781e9662c9a8 Mon Sep 17 00:00:00 2001 From: arnaucube Date: Tue, 2 Nov 2021 16:04:23 +0100 Subject: [PATCH] Add GHA to test the circuits --- .github/workflows/test.yml | 26 ++++++++++++++++++++++++++ README.md | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..7db50dc --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,26 @@ +name: Test +on: [ push, pull_request ] +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [14.x] + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: Prepare circom + run: | + # once circom binary is published, instead of compiling from source + # every time, use the published binaries + git clone https://github.com/iden3/circom.git + cd circom + cargo build --release + cargo install --path circom + - name: run tests + run: | + npm install + npm run test diff --git a/README.md b/README.md index 587f437..8ffcb77 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# keccak256-circom +# keccak256-circom [![Test](https://github.com/arnaucube/keccak256-circom/workflows/Test/badge.svg)](https://github.com/arnaucube/keccak256-circom/actions?query=workflow%3ATest) WIP repo. Once ready, will do a PR into [circomlib](https://github.com/iden3/circomlib).