chik-wallet-sdk 0.25.0

An unofficial SDK for building Chik wallets.
Documentation
name: Rust
on:
  push:
    branches:
      - main1
    tags:
      - "**"

  pull_request:
    branches:
      - "**"

concurrency:
  group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow_ref, github.event.pull_request.number) || github.run_id }}
  cancel-in-progress: true

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Cargo binstall
        run: curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash

      - name: Setup Rust
        uses: dtolnay/rust-toolchain@stable

      - name: Install cargo-workspaces
        run: cargo binstall cargo-workspaces --locked -y

      - name: Install cargo-tarpaulin
        run: cargo install cargo-tarpaulin --locked

      - name: Run tests
        run: cargo tarpaulin --release --workspace --exclude chik-wallet-sdk-napi --exclude chik-sdk-derive --exclude chik-wallet-sdk-py --exclude chik-wallet-sdk-wasm --exclude chik-sdk-bindings --exclude binky --exclude binky-macro --all-features --out xml

      - name: Upload coverage reports to Codecov
        uses: codecov/codecov-action@v4.0.1
        with:
          token: ${{ secrets.CODECOV_TOKEN }}

      - name: Cleanup coverage reports
        run: rm -f cobertura.xml

      - name: Clippy
        run: cargo clippy --workspace --all-features --all-targets

      - name: Unused dependencies
        run: |
          cargo binstall cargo-machete --locked -y
          cargo machete

      - name: Fmt
        run: cargo fmt --all -- --files-with-diff --check

      - name: Publish
        if: startsWith(github.event.ref, 'refs/tags')
        env:
          CARGO_REGISTRY_TOKEN: ${{ secrets.cargo_registry_token }}
        run: cargo ws publish --publish-as-is --allow-dirty