2023-03-07 18:17:13 -06:00
|
|
|
# This workflow runs the tests for the circuits.
|
|
|
|
name: Test
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ "master" ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ "master" ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Cache circom
|
|
|
|
id: cache-circom
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: ~/.cargo/bin/circom
|
|
|
|
# Since the version of circom is specified in `scripts/install-circom.sh`,
|
|
|
|
# as long as the file doesn't change we can reuse the circom binary.
|
|
|
|
key: ${{ runner.os }}-circom-${{ hashFiles('./scripts/install-circom.sh') }}
|
|
|
|
- name: Install circom if not cached
|
|
|
|
run: sh ./scripts/install-circom.sh
|
2023-03-20 19:03:03 -06:00
|
|
|
- name: Build circuits
|
|
|
|
run: sh ./scripts/circuit-prep.sh
|
2023-03-07 18:17:13 -06:00
|
|
|
- name: Run the tests
|
2023-03-20 18:48:48 -06:00
|
|
|
run: RUST_BACKTRACE=full cargo test -r
|