Skip to content

Commit

Permalink
chore: add circuit tests to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
saleel committed Jan 31, 2024
1 parent 1c43c5e commit ac8684c
Show file tree
Hide file tree
Showing 3 changed files with 448 additions and 2 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,49 @@
name: "Proof of Twitter tests"
description: "Runs circuit and contract unit tests, and e2e tests with app running locally"
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

run_contract_tests:
runs-on: ubuntu-latest
environment: development
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ node_modules.nosync
*wallet*
circuits/regexes/subject_regex*

# Files that never should be committed, but can be obtained by asking Aayush or generating them yourself
*.eml
*_email.txt
*email_cache.json
*input.json
Expand Down
Loading

0 comments on commit ac8684c

Please sign in to comment.