varj 1.2.0

Ultra-lightweight string templating library. No Dependencies
Documentation
name: tests

on:
  push:
    branches:
      - "master"
      - "ci"

  pull_request:
    branches:
      - "master"
      - "dev"

env:
  RUST_BACKTRACE: 1

jobs:
  tests:
    strategy:
      fail-fast: false
      matrix:
        # minimum supported rust version
        rust: [1.71.1, stable]
        on:
          - { os: ubuntu-latest, target: x86_64-unknown-linux-gnu }
          - { os: macos-latest, target: x86_64-apple-darwin }
          - { os: windows-latest, target: x86_64-pc-windows-msvc }

    runs-on: ${{ matrix.on.os }}
    steps:
      - uses: actions/checkout@v4

      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{ matrix.rust }}
          target: ${{ matrix.on.target }}

      - name: Build tests
        run: cargo test --no-run --all-features

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

  docs:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install nightly
        uses: dtolnay/rust-toolchain@nightly

      - name: cargo doc
        run: cargo doc --no-deps --all-features --document-private-items
        env:
          RUSTDOCFLAGS: --cfg docsrs -D warnings

  rustfmt:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install stable
        uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt

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

  clippy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install stable
        uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy

      - name: Run clippy
        run: cargo clippy --all --examples --tests -- -D warnings

  coverage:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install stable
        uses: dtolnay/rust-toolchain@stable
        with:
          components: llvm-tools-preview

      - name: cargo install cargo-llvm-cov
        uses: taiki-e/install-action@cargo-llvm-cov

      - name: llvm-cov
        run: cargo llvm-cov --all-features --lcov --output-path lcov.info

      - name: Archive code coverage results
        uses: actions/upload-artifact@v4
        with:
          name: code_coverage_result
          path: lcov.info

      - name: Upload to codecov.io
        uses: codecov/codecov-action@v4
        env:
          CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
        with:
          files: lcov.info
          fail_ci_if_error: false