pbech32 0.2.0

Bech32 encoding and decoding library.
Documentation
name: CI

on:
  push:
    branches: ["main"]

env:
  CARGO_TERM_COLOR: always

jobs:
  build_lint_test:
    name: "build, lint, test (${{ matrix.toolchain }})"
    runs-on: "ubuntu-latest"
    strategy:
      matrix:
        toolchain:
          - stable
          - beta
          - nightly
    steps:
      - uses: actions/checkout@v6
      - uses: actions/cache@v5
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
            target/
          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
      - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
      - run: rustup component add clippy
      - run: cargo build --verbose
      - run: cargo clippy
      - run: cargo test --verbose 

  doc:
    name: "doc"
    runs-on: "ubuntu-latest"
    steps:
      - uses: actions/checkout@v6
      - run: cargo doc

  # lint all markdown
  lint_markdown:
    name: "lint markdown"
    runs-on: "ubuntu-latest"
    steps:
      - uses: actions/checkout@v5
      - run: npm config set update-notifier false
      - run: npx -y markdownlint-cli '**/*.md'

  # check code coverage
  # - fails if coverage drops below 95%
  # - generates "pbech32-coverage-YYYYMMDD.zip" artifact
  coverage:
    name: "coverage"
    runs-on: "ubuntu-latest"
    container:
      image: "xd009642/tarpaulin:develop-nightly"
      options: --security-opt seccomp=unconfined
    steps:
      - run: echo "DATESTAMP=$(date +%Y%m%d)" >> $GITHUB_ENV
      - uses: actions/checkout@v6

      # fail if code coverage is below 95%
      #
      # run tarpaulin with single thread and include ignored tests.
      # this is to work around issues with threads for
      # tests::action::test_from_env() in `src/bin/bech32.rs`
      - run: cargo +nightly tarpaulin -j1 -i -o stdout -o html --timeout 120 --fail-under 95
      - run: mv tarpaulin-report.html pbech32-coverage-${{ env.DATESTAMP }}.html
      - uses: actions/upload-artifact@v6
        with:
          name: pbech32-coverage-${{ env.DATESTAMP }}.zip
          path: pbech32-coverage-${{ env.DATESTAMP }}.html

  # security audit
  # (note: mostly pointless since polycvss has no dependencies)
  audit:
    name: "audit"
    runs-on: "ubuntu-latest"
    steps:
      - uses: actions/checkout@v5
      - uses: actions/cache@v5
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
            ~/.cargo/advisory-db
            target/
          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
      - run: cargo install cargo-audit
      - run: cargo audit