diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index be8756fe..bf70beb2 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -17,33 +17,24 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Set default toolchain - run: rustup default nightly - - - name: Set profile - run: rustup set profile minimal - - - name: Install grcov - run: cargo install grcov --force --version 0.8.2 - + - name: Install Rust toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - name: Install dependencies on macOS if: matrix.os == 'macos-latest' run: brew install automake libtool zeromq - - name: Run cargo test - env: - CARGO_INCREMENTAL: '0' - RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off' - RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off' - run: cargo test --features=integration-test -- --nocapture + - name: Install cargo-tarpaulin + run: cargo install cargo-tarpaulin - - id: coverage - name: Generate coverage - uses: actions-rs/grcov@v0.1.5 + - name: Run cargo-tarpaulin + run: cargo tarpaulin --timeout 1900 --out Xml --output-dir "./coverage/reports/" --features integration-test -- --nocapture - name: Upload coverage to Codecov - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} - file: ${{ steps.coverage.outputs.report }} - directory: ./coverage/reports/ + file: ./coverage/reports/cobertura.xml diff --git a/codecov.yaml b/codecov.yaml index 062eabbd..83d545b8 100644 --- a/codecov.yaml +++ b/codecov.yaml @@ -3,7 +3,7 @@ coverage: project: default: target: auto - threshold: 1% + threshold: 10% base: auto informational: false patch: diff --git a/src/wallet/fidelity.rs b/src/wallet/fidelity.rs index 6b4a27b4..87baf065 100644 --- a/src/wallet/fidelity.rs +++ b/src/wallet/fidelity.rs @@ -263,7 +263,7 @@ impl Wallet { (info.height, info.time as u64) }; // Estimated locktime from block height = [current-time + (maturity-height - block-count) * 10 * 60] sec - tip_time + (((blocks.to_consensus_u32() - (tip_height as u32)) * 10 * 60) as u64) + tip_time + ((blocks.to_consensus_u32() as u64 - tip_height as u64) * 10 * 60) } LockTime::Seconds(sec) => sec.to_consensus_u32() as u64, };