hexstring 0.1.5

An utility library for handling hexadecimal string
Documentation
name: CI

on:
  push:
    branches: [main, develop]
    tags-ignore: [v*]
  pull_request:
    branches: [develop]

jobs:
  lint:
    name: Lints
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v6

      - name: Install Rust
        uses: actions-rust-lang/setup-rust-toolchain@v1
        with:
          components: rustfmt, clippy
          rustflags: ""

      - name: Run cargo fmt
        run: cargo fmt --all -- --check

      - name: Run cargo check
        run: cargo check --all-targets --all-features

      - name: Run cargo clippy
        run: cargo clippy --all-targets --all-features -- -D warnings

  build:
    name: Build
    needs: [lint]
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v6

      - name: Install Rust
        uses: actions-rust-lang/setup-rust-toolchain@v1
        with:
          rustflags: ""

      - name: Run cargo build
        run: cargo build --all-features

      - name: Run cargo test
        run: cargo test --all-features

  build-target:
    name: Build on ${{ matrix.name }}
    needs: [lint]
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: true
      matrix:
        include:
          - os: windows-latest
            name: Windows
          - os: macos-latest
            name: MacOS
    steps:
      - name: Checkout repository
        uses: actions/checkout@v6

      - name: Install Rust
        uses: actions-rust-lang/setup-rust-toolchain@v1
        with:
          rustflags: ""

      - name: Run cargo build
        run: cargo build --all-features

      - name: Run cargo test
        run: cargo test --all-features

  coverage:
    name: Code coverage
    needs: [build]
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v6

      - name: Install Rust
        uses: actions-rust-lang/setup-rust-toolchain@v1
        with:
          rustflags: ""

      - name: Install cargo-llvm-cov
        run: cargo install cargo-llvm-cov

      - name: Generate coverage report (Cobertura)
        run: cargo llvm-cov --workspace --all-features --cobertura --output-path cobertura.xml

      - name: Upload to codecov.io
        uses: codecov/codecov-action@v4
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
          files: cobertura.xml
          fail_ci_if_error: true

      - name: Archive code coverage results
        uses: actions/upload-artifact@v4
        with:
          name: coverage-report
          path: cobertura.xml