intmap 3.1.3

Specialized HashMap for integer keys
Documentation
name: Check and Test
on: [pull_request]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        rust:
          - version: 1.80.1
            integration-tests: true
          - version: 1.58.1
            integration-tests: false

    steps:
      - uses: actions/checkout@v4

      - name: Cache Cargo
        uses: actions/cache@v4
        with:
          path: |
            ~/.cargo/registry
            ~/.cargo/git
            target
          key: ${{ matrix.rust.version }}-cargo-${{ hashFiles('**/Cargo.lock') }}
          restore-keys: |
            ${{ matrix.rust.version }}-cargo-

      - name: Install Rust
        run: |
          curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y
          source $HOME/.cargo/env
          rustup update ${{ matrix.rust.version }} --no-self-update
          rustup default ${{ matrix.rust.version }}

      - name: Check lib
        run: |
          $HOME/.cargo/bin/cargo check --all-targets --no-default-features
          $HOME/.cargo/bin/cargo check --all-targets
          $HOME/.cargo/bin/cargo clippy --all-targets
          $HOME/.cargo/bin/cargo fmt --check
          $HOME/.cargo/bin/cargo test
        env:
          RUST_BACKTRACE: 1

      - name: Check integration tests
        run: |
          pushd integration_tests
          $HOME/.cargo/bin/cargo check --all-targets
          $HOME/.cargo/bin/cargo clippy --all-targets
          $HOME/.cargo/bin/cargo fmt --check
          $HOME/.cargo/bin/cargo test
          popd
        if: ${{ matrix.rust.integration-tests }}
        env:
          RUST_BACKTRACE: 1