Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(CI): add test for all features #270

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 35 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ on:
name: Tests

jobs:
test:
utils-test:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest]
crate: [rln, utils]
platform: [ ubuntu-latest, macos-latest ]
crate: [ utils ]
runs-on: ${{ matrix.platform }}
timeout-minutes: 60

Expand All @@ -47,10 +47,37 @@ jobs:
cargo make test --release
working-directory: ${{ matrix.crate }}

rln-test:
strategy:
matrix:
platform: [ ubuntu-latest, macos-latest ]
crate: [ rln ]
feature: [ "default", "arkzkey", "stateless" ]
runs-on: ${{ matrix.platform }}
timeout-minutes: 60

name: test - ${{ matrix.crate }} - ${{ matrix.platform }} - ${{ matrix.feature }}
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v2
- name: Install dependencies
run: make installdeps
- name: cargo-make test
run: |
cargo make test_${{ matrix.feature }} --release
working-directory: ${{ matrix.crate }}

rln-wasm:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest]
platform: [ ubuntu-latest, macos-latest ]
runs-on: ${{ matrix.platform }}
timeout-minutes: 60

Expand All @@ -77,8 +104,8 @@ jobs:
strategy:
matrix:
# we run lint tests only on ubuntu
platform: [ubuntu-latest]
crate: [rln, utils]
platform: [ ubuntu-latest ]
crate: [ rln, utils ]
runs-on: ${{ matrix.platform }}
timeout-minutes: 60

Expand Down Expand Up @@ -114,8 +141,8 @@ jobs:
strategy:
matrix:
# we run benchmark tests only on ubuntu
platform: [ubuntu-latest]
crate: [rln, utils]
platform: [ ubuntu-latest ]
crate: [ rln, utils ]
runs-on: ${{ matrix.platform }}
timeout-minutes: 60

Expand Down
10 changes: 9 additions & 1 deletion rln/Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,18 @@
command = "cargo"
args = ["build", "--release"]

[tasks.test]
[tasks.test_default]
command = "cargo"
args = ["test", "--release"]

[tasks.test_stateless]
command = "cargo"
args = ["test", "--release", "--features", "stateless"]

[tasks.test_arkzkey]
command = "cargo"
args = ["test", "--release", "--features", "arkzkey"]

[tasks.bench]
command = "cargo"
args = ["bench"]
Loading