Skip to content

Commit

Permalink
add circuit test to github actios
Browse files Browse the repository at this point in the history
  • Loading branch information
saleel committed Feb 6, 2024
1 parent 1c5ac66 commit 3b76c5f
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 22 deletions.
44 changes: 22 additions & 22 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
version: 2.1
orbs:
node: circleci/[email protected]
rust: circleci/[email protected]
jobs:
run_circuit_tests:
docker:
- image: saleel/circom:2.1.6
steps:
- checkout:
path: ~/zk-email-verify
- node/install-packages:
pkg-manager: yarn
app-dir: ~/zk-email-verify
- run:
command: yarn test -w 2
name: Run circom tests
working_directory: ~/zk-email-verify/packages/circuits
workflows:
build_test:
jobs:
- run_circuit_tests
# version: 2.1
# orbs:
# node: circleci/[email protected]
# rust: circleci/[email protected]
# jobs:
# run_circuit_tests:
# docker:
# - image: saleel/circom:2.1.6
# steps:
# - checkout:
# path: ~/zk-email-verify
# - node/install-packages:
# pkg-manager: yarn
# app-dir: ~/zk-email-verify
# - run:
# command: yarn test -w 2
# name: Run circom tests
# working_directory: ~/zk-email-verify/packages/circuits
# workflows:
# build_test:
# jobs:
# - run_circuit_tests
44 changes: 44 additions & 0 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: ZK Email tests
on: [push]
jobs:
run_circuit_tests:
runs-on: ubuntu-latest
environment: development
steps:
- uses: actions/checkout@v3

# Circom installation from https://github.com/erhant/circomkit/blob/main/.github/workflows/tests.yml
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install --yes \
build-essential \
libgmp-dev \
libsodium-dev \
nasm \
nlohmann-json3-dev
- name: Set Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable

- name: Download Circom Binary v2.1.5
run: |
wget -qO /home/runner/work/circom https://github.com/iden3/circom/releases/download/v2.1.5/circom-linux-amd64
chmod +x /home/runner/work/circom
sudo mv /home/runner/work/circom /bin/circom
- name: Print Circom version
run: circom --version

- name: Install Yarn dependencies
working-directory: ./packages/circuits
run: yarn install --immutable

- name: Run Tests
working-directory: ./packages/circuits
run: yarn test

0 comments on commit 3b76c5f

Please sign in to comment.