geoip2 0.1.8

Library for reading MaxMind DB format used by GeoIP2 and GeoLite2
Documentation
name: Rust

on: [push, pull_request]

env:
  CARGO_TERM_COLOR: always

jobs:
  check:
    name: Check
    strategy:
      matrix:
        platform: [ubuntu-latest, macos-latest, windows-latest]
        toolchain: [stable, beta, nightly]
    runs-on: ${{ matrix.platform }}

    steps:
      - uses: actions/checkout@v4
      - name: Install ${{ matrix.toolchain }} toolchain
        uses: dtolnay/rust-toolchain@stable
        with:
          profile: minimal
          toolchain: ${{ matrix.toolchain }}

      - name: Run cargo check
        run: cargo check

  test:
    name: Test Suite
    strategy:
      matrix:
        platform: [ubuntu-latest, macos-latest, windows-latest]
        toolchain: [stable, beta, nightly]
    runs-on: ${{ matrix.platform }}
    steps:
      - name: Checkout sources
        uses: actions/checkout@v4
        with:
          submodules: true

      - name: Install ${{ matrix.toolchain }} toolchain
        uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: ${{ matrix.toolchain }}

      - name: Run cargo test
        run: cargo test --test geoip

  lints:
    name: Lints
    runs-on: ubuntu-latest
    steps:
      - name: Checkout sources
        uses: actions/checkout@v4

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

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

      - name: Run cargo clippy
        run: cargo clippy -- -D warnings