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 9e67c20
Show file tree
Hide file tree
Showing 3 changed files with 461 additions and 35 deletions.
90 changes: 57 additions & 33 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,70 @@
on: [push]
jobs:
run_contract_tests:
run_circuit_tests:
runs-on: ubuntu-latest
environment: development
steps:
- uses: actions/checkout@v3
- name: Set Node.js 16.x
- name: Set Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
node-version: 18
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Circom
id: Circom
uses: actions/cache@v3
with:
path: ~/.cargo/bin/circom
key: circom
- name: Install Yarn dependencies
working-directory: ./packages/contracts
working-directory: ./packages/circuits
run: yarn install --immutable
- name: Run Tests
run: forge test --root ./packages/contracts --fork-url https://eth-goerli.g.alchemy.com/v2/${{vars.ALCHEMY_API_KEY}}

run_app_unit_and_e2e_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 'true'
- name: Install Yarn dependencies
working-directory: ./packages/app
run: yarn install
- name: Run test
working-directory: ./packages/app
working-directory: ./packages/circuits
run: yarn test
- name: Run build
working-directory: ./packages/app
run: yarn build
- name: E2E Test Code
uses: mujo-code/[email protected]
env:
CI: "true"
with:
args: yarn workspace @zk-email/twitter-verifier-app test:full-e2e

# run_contract_tests:
# runs-on: ubuntu-latest
# environment: development
# steps:
# - uses: actions/checkout@v3
# - name: Set Node.js 16.x
# uses: actions/setup-node@v3
# with:
# node-version: 16
# - name: Install Foundry
# uses: foundry-rs/foundry-toolchain@v1
# - name: Install Yarn dependencies
# working-directory: ./packages/contracts
# run: yarn install --immutable
# - name: Run Tests
# run: forge test --root ./packages/contracts --fork-url https://eth-goerli.g.alchemy.com/v2/${{vars.ALCHEMY_API_KEY}}

# run_app_unit_and_e2e_tests:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: Set Node.js 16.x
# uses: actions/setup-node@v3
# with:
# node-version: 16
# cache: 'yarn'
# env:
# PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 'true'
# - name: Install Yarn dependencies
# working-directory: ./packages/app
# run: yarn install
# - name: Run test
# working-directory: ./packages/app
# run: yarn test
# - name: Run build
# working-directory: ./packages/app
# run: yarn build
# - name: E2E Test Code
# uses: mujo-code/[email protected]
# env:
# CI: "true"
# with:
# args: yarn workspace @zk-email/twitter-verifier-app test:full-e2e

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 9e67c20

Please sign in to comment.