pretty_decimal 0.1.1

library for Decimal type with pretty printing.
Documentation
name: CI
on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main

permissions:
  contents: write
  deployments: write
  pull-requests: write

jobs:
  cargo-deny:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - uses: EmbarkStudios/cargo-deny-action@v2
      with:
        arguments: --all-features
  test:
    strategy:
      matrix:
        build:
          - linux-stable
          - windows-stable
          - macos-stable
        features:
          - default
          - all
        include:
          - build: linux-stable
            os: ubuntu-latest
            target: x86_64-unknown-linux-gnu
          - build: windows-stable
            os: windows-latest
            target: x86_64-pc-windows-msvc
          - build: macos-stable
            os: macos-latest
            target: aarch64-apple-darwin
          - features: default
            feature-flag: ""
          - features: all
            feature-flag: --all-features
    runs-on: ${{ matrix.os }}
    env:
      CARGO_TERM_COLOR: always
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: stable
          target: ${{ matrix.target }}
      - uses: Swatinem/rust-cache@v2
      - run: cargo test --target ${{ matrix.target }} ${{ matrix.feature-flag }}
  coverage:
    runs-on: ubuntu-latest
    env:
      CARGO_TERM_COLOR: always
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: stable
          target: x86_64-unknown-linux-gnu
      - name: Install cargo-llvm-cov
        uses: taiki-e/install-action@cargo-llvm-cov
      - uses: Swatinem/rust-cache@v2
      - name: Collect coverage
        run: |
          cargo llvm-cov --all-features --lcov --output-path lcov.info
      - name: Upload coverage to Codecov
        uses: codecov/codecov-action@v5
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
  benchmark:
    name: Run benchmark
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: stable
          target: x86_64-unknown-linux-gnu
      - uses: Swatinem/rust-cache@v2
      - name: Run benchmark
        run: |
          cargo bench --bench bench -- --output-format bencher | tee output.txt
      - name: Store benchmark result
        uses: benchmark-action/github-action-benchmark@v1
        with:
          name: Criterion.rs Benchmark
          tool: 'cargo'
          output-file-path: output.txt
          auto-push: false
          alert-threshold: '200%'
          comment-on-alert: true
          fail-on-alert: ${{ github.event_name == 'pull_request' }}
          alert-comment-cc-users: '@xkikeg'
          summary-always: true
          github-token: ${{ secrets.GITHUB_TOKEN }}
      - name: Push benchmark result
        run: |
          git push 'https://xkikeg:${{ secrets.GITHUB_TOKEN }}@github.com/xkikeg/pretty-decimal.git' gh-pages:gh-pages
        if: github.event_name != 'pull_request'