added snarkjs installation #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust Tests | |
on: | |
push: | |
branches: ["main"] | |
paths: | |
- "src/**" | |
- "tests/**" | |
- "Cargo.toml" | |
- "Cargo.lock" | |
- ".github/workflows/test.yaml" | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
test: | |
name: Run Tests | |
runs-on: ubuntu-latest | |
# TODO: add snarkjs here as well | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Build | |
run: cargo build --verbose | |
- name: Install NodeJS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
cache: "npm" | |
- run: npm install -g snarkjs@latest | |
- name: Run tests | |
run: cargo test --verbose |