Skip to content

Commit a64e8d9

Browse files
author
Deepak Aggarwal
committed
add: run automated tests via github actions
1 parent 33fb4ba commit a64e8d9

File tree

3 files changed

+35
-1
lines changed

3 files changed

+35
-1
lines changed

.github/workflows/run_test.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: run tests
2+
on: push
3+
jobs:
4+
build:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: Checkout
8+
uses: actions/checkout@v2
9+
10+
- name: print cur dir
11+
run: pwd
12+
13+
- name: setup circom
14+
run: |
15+
chmod +x ./scripts/setup_circom.sh
16+
./scripts/setup_circom.sh
17+
18+
- name: Install modules
19+
run: npm install
20+
21+
- name: Run tests
22+
run: npm run test

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"scripts": {
99
"build": "tsc --project tsconfig.json && cp -r src/vendors dist/vendors",
1010
"clean": "rm -rf dist types",
11-
"test": "echo 1"
11+
"test": "jest"
1212
},
1313
"keywords": [
1414
"circom",

scripts/setup_circom.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
# exit on error
4+
set -e
5+
6+
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh -y
7+
git clone https://github.com/iden3/circom.git
8+
cd circom
9+
cargo build --release
10+
cargo install --path circom
11+
12+
npm install -g snarkjs

0 commit comments

Comments
 (0)