meilisearch-sdk 0.33.0

Rust wrapper for the Meilisearch API. Meilisearch is a powerful, fast, open-source, easy to use and deploy search engine.
Documentation
name: Tests

on:
  pull_request:
  push:
    branches:
      - main
  merge_group:

env:
  CARGO_TERM_COLOR: always

jobs:
  integration_tests:
    # Will not run if the event is a PR to bump-meilisearch-v* (so a pre-release PR)
    # Will still run for each push to bump-meilisearch-v*
    if: github.event_name != 'pull_request' || !startsWith(github.base_ref, 'bump-meilisearch-v')
    runs-on: ubuntu-latest
    name: integration-tests
    steps:
      - uses: actions/checkout@v6
      - name: Build
        run: cargo build --verbose
      - name: Meilisearch (latest version) setup with Docker
        run: docker run -d -p 7700:7700 getmeili/meilisearch-enterprise:latest meilisearch --no-analytics --master-key=masterKey
      - name: Run tests
        run: cargo test --verbose
      - name: Cargo check
        uses: actions-rs/cargo@v1
        with:
          command: check
          args: --workspace --all-targets --all
      - name: Cargo check no default features
        uses: actions-rs/cargo@v1
        with:
          command: check
          args: --workspace --all-targets --all --no-default-features

  linter:
    name: clippy-check
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - name: Install clippy
        run: rustup component add clippy
      - name: Run linter (clippy)
        # Will fail when encountering warnings
        run: cargo clippy -- -D warnings

  formatter:
    name: rust-format
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - name: Run formatter
        run: cargo fmt --all -- --check

  readme_check:
    name: readme-check
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - name: Check the README.md file is up-to-date
        run: sh scripts/check-readme.sh

  wasm_build:
    name: wasm-build
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - name: Build
        run: |
          rustup target add wasm32-unknown-unknown
          cargo check -p web_app --target wasm32-unknown-unknown
  yaml-lint:
    name: Yaml linting check
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - name: Yaml lint check
        uses: ibiqlik/action-yamllint@v3
        with:
          config_file: .yamllint.yml

  coverage:
    if: github.actor != 'dependabot[bot]' && !( github.event_name == 'pull_request' && startsWith(github.base_ref, 'bump-meilisearch-v') )
    runs-on: ubuntu-latest
    needs: integration_tests
    name: Code Coverage
    steps:
      - uses: actions/checkout@v6
      - name: Meilisearch (latest version) setup with Docker
        run: docker run -d -p 7700:7700 getmeili/meilisearch-enterprise:latest meilisearch --no-analytics --master-key=masterKey
      - name: Install cargo-llvm-cov
        uses: taiki-e/install-action@cargo-llvm-cov
      - name: Generate code coverage
        run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
      - name: Upload coverage to Codecov
        uses: codecov/codecov-action@v5
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
          files: lcov.info
          fail_ci_if_error: true