diff --git a/.github/workflows/rust_ci.yml b/.github/workflows/rust_ci.yml index 8e1e52ab0e..f6af492314 100644 --- a/.github/workflows/rust_ci.yml +++ b/.github/workflows/rust_ci.yml @@ -12,8 +12,6 @@ on: - ".cargo/**" - "Cargo*" push: - branches: - - master paths: - "benchmarks/**" - "ironfish-mpc/**" @@ -87,6 +85,10 @@ jobs: ironfish_rust: name: Test ironfish-rust runs-on: ubuntu-latest + strategy: + matrix: + shard: [1/2, 2/2] + steps: - uses: actions/checkout@v4 @@ -95,20 +97,33 @@ jobs: with: shared-key: base - # Run tests to collect code coverage - - name: Run cargo-tarpaulin on ironfish-rust + - name: install cargo-llvm-cov + uses: taiki-e/install-action@cargo-llvm-cov + + - name: Install nextest + uses: taiki-e/install-action@nextest + + - name: Run tests run: | - wget -O tarpaulin.tar.gz https://github.com/xd009642/tarpaulin/releases/download/0.22.0/cargo-tarpaulin-0.22.0-travis.tar.gz - tar -xzf tarpaulin.tar.gz - mv cargo-tarpaulin ~/.cargo/bin/ - cargo tarpaulin -p ironfish --release --out Xml --avoid-cfg-tarpaulin --skip-clean --timeout 300 -- --test-threads 1 + # ~/.cargo/bin/cargo-nextest nextest run --release --partition count:${{ matrix.shard }} + # cargo nextest run --release --partition count:${{ matrix.shard }} + cargo llvm-cov nextest --release --partition count:${{ matrix.shard }} - # Upload code coverage to Codecov + # Run tests to collect code coverage + # - name: Run cargo-tarpaulin on ironfish-rust + # run: | + # wget -O tarpaulin.tar.gz https://github.com/xd009642/tarpaulin/releases/download/0.22.0/cargo-tarpaulin-0.22.0-travis.tar.gz + # tar -xzf tarpaulin.tar.gz + # mv cargo-tarpaulin ~/.cargo/bin/ + # cargo tarpaulin -p ironfish --release --out Xml --avoid-cfg-tarpaulin --skip-clean --timeout 300 -- --test-threads 1 + + # # Upload code coverage to Codecov - name: Upload to codecov.io uses: codecov/codecov-action@v4 with: token: ${{secrets.CODECOV_TOKEN}} flags: ironfish-rust + files: lcov.info ironfish_zkp: name: Test ironfish-zkp diff --git a/ironfish-rust-nodejs/src/lib.rs b/ironfish-rust-nodejs/src/lib.rs index 31cdc60cc5..a0caed93d7 100644 --- a/ironfish-rust-nodejs/src/lib.rs +++ b/ironfish-rust-nodejs/src/lib.rs @@ -28,6 +28,8 @@ pub mod signal_catcher; pub mod structs; pub mod xchacha20poly1305; +// trigger rust tests + #[cfg(feature = "stats")] pub mod stats;