lru_time_cache 0.11.11

Implementation of a Least Recently Used caching algorithm in a container which may be limited by size or time, ordered by most recently seen.
Documentation
# PR workflow.
#
# Runs full suite of checks, with warnings treated as errors.
# Gather code coverage stats and publish them on coveralls.io.

name: PR

on:
  pull_request:

env:
  # Run all cargo commands with --verbose.
  CARGO_TERM_VERBOSE: true
  RUST_BACKTRACE: 1
  # Deny all compiler warnings.
  RUSTFLAGS: "-D warnings"

jobs:
  checks:
    if: "!startsWith(github.event.pull_request.title, 'Automated version bump')"
    name: Rustfmt & Clippy
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      # Install Rust and required components
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true
          components: rustfmt, clippy

      # Cache.
      - name: Cargo cache registry, index and build
        uses: actions/cache@v2.1.4
        with:
          path: |
            ~/.cargo/registry
            ~/.cargo/git
            target
          key: ${{ runner.os }}-cargo-cache-${{ hashFiles('**/Cargo.lock') }}

      # Check if the code is formatted correctly.
      - name: Check formatting
        run: cargo fmt --all -- --check
      
      # Run Clippy.
      - shell: bash
        run: ./scripts/clippy

  check_pr_size:
    if: "!startsWith(github.event.pull_request.title, 'Automated version bump')"
    name: Check PR size doesn't break set limit
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
      with:
        fetch-depth: '0'
    - uses: maidsafe/pr_size_checker@v2
      with:
        max_lines_changed: 200
  
  geiger:
    if: "!startsWith(github.event.pull_request.title, 'Automated version bump')"
    name: Cargo geiger
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Install Rust
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true

      # Cache.
      - name: Cargo cache registry, index and build
        uses: actions/cache@v2.1.4
        with:
          path: |
            ~/.cargo/registry
            ~/.cargo/git
            target
          key: ${{ runner.os }}-cargo-cache-${{ hashFiles('**/Cargo.lock') }}

      - name: Install geiger
        run: cargo install --locked cargo-geiger
      
      # Run cargo geiger to list statistics related to the usage of unsafe Rust code in this crate and all its dependencies.
      - name: Run Cargo geiger
        run: cargo geiger --all-features --all-targets --all-dependencies
  
  coverage:
    if: "!startsWith(github.event.pull_request.title, 'Automated version bump')"
    name: Code coverage check
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      # Install Rust
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true

      # Cache.
      - name: Cargo cache registry, index and build
        uses: actions/cache@v2.1.4
        with:
          path: |
            ~/.cargo/registry
            ~/.cargo/git
            target
          key: ${{ runner.os }}-cargo-cache-${{ hashFiles('**/Cargo.lock') }}

      # Run cargo tarpaulin & push result to coveralls.io
      - name: rust-tarpaulin code coverage check
        uses: actions-rs/tarpaulin@v0.1
        with:
          args: '-v --release --out Lcov'
      - name: Push code coverage results to coveralls.io
        uses: coverallsapp/github-action@master
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          parallel: true
          path-to-lcov: ./lcov.info
      - name: Coveralls Finished
        uses: coverallsapp/github-action@master
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          parallel-finished: true

  cargo-udeps:
    if: "!startsWith(github.event.pull_request.title, 'Automated version bump')"
    name: Unused dependency check
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      # Install Rust and required components
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: nightly
          override: true

      - name: Run cargo-udeps
        uses: aig787/cargo-udeps-action@v1
        with:
          version: 'latest'
          args: '--all-targets'

  cargo-deny:
    if: "!startsWith(github.event.pull_request.title, 'Automated version bump')"
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2

    # wget the shared deny.toml file from the QA repo
    - shell: bash
      run: wget https://raw.githubusercontent.com/maidsafe/QA/master/misc-scripts/deny.toml

    - uses: EmbarkStudios/cargo-deny-action@v1

  test:
    if: "!startsWith(github.event.pull_request.title, 'Automated version bump')"
    name: Test
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macOS-latest]
    steps:
      - uses: actions/checkout@v2
      # Install Rust
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true

      # Cache.
      - name: Cargo cache registry, index and build
        uses: actions/cache@v2.1.4
        with:
          path: |
            ~/.cargo/registry
            ~/.cargo/git
            target
          key: ${{ runner.os }}-cargo-cache-${{ hashFiles('**/Cargo.lock') }}

      # Run tests.
      - shell: bash
        run: ./scripts/tests

  # Test publish using --dry-run.
  test-publish:
    if: "!startsWith(github.event.pull_request.title, 'Automated version bump')"
    name: Test Publish
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      # Install Rust
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true

      - name: Cargo publish dry run
        run: cargo publish --dry-run