diff --git a/.github/workflows/run_test.yaml b/.github/workflows/run_test.yaml new file mode 100644 index 0000000..f67cc68 --- /dev/null +++ b/.github/workflows/run_test.yaml @@ -0,0 +1,22 @@ +name: run tests +on: push +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: print cur dir + run: pwd + + - name: setup circom + run: | + chmod +x ./scripts/setup_circom.sh + ./scripts/setup_circom.sh + + - name: Install modules + run: npm install + + - name: Run tests + run: npm run test \ No newline at end of file diff --git a/package.json b/package.json index d80d648..0870c52 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "scripts": { "build": "tsc --project tsconfig.json && cp -r src/vendors dist/vendors", "clean": "rm -rf dist types", - "test": "echo 1" + "test": "jest" }, "keywords": [ "circom", diff --git a/scripts/setup_circom.sh b/scripts/setup_circom.sh new file mode 100644 index 0000000..c8e805e --- /dev/null +++ b/scripts/setup_circom.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# exit on error +set -e + +curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh -s -- -y +git clone https://github.com/iden3/circom.git +cd circom +cargo build --release +cargo install --path circom + +npm install -g snarkjs