simple-ldap 9.0.0

A high-level LDAP client for Rust
Documentation
name: Publish to crates.io

on:
    push:
        tags:
            # Only on SemVer tags like "7.3.0".
            # Push a new tag to make a new release.
            # It should match the version in Cargo.toml
            # (Perhaps we could add a check for this?)
            - "[0-9]+.[0-9]+.[0-9]+"

jobs:
    build:
        runs-on: ubuntu-latest

        services:
            ldap:
                image: openidentityplatform/opendj
                ports:
                    - 1389:1389
                options: >
                    --env ROOT_USER_DN="cn=manager"

        steps:
            - name: Checkout code
              uses: actions/checkout@v3

            - name: Get LDAP container ID
              id: ldap_container_id
              run: echo "LDAP_CONTAINER_ID=$(docker ps --filter 'ancestor=openidentityplatform/opendj:latest' -q)" >> $GITHUB_ENV

            - name: Copy LDIF to LDAP container
              run: docker cp ./data/data.ldif ${{ env.LDAP_CONTAINER_ID }}:/tmp/data.ldif

            - name: Import LDIF into OpenDJ
              run: |
                  docker exec ${{ job.services.ldap.id }} \
                  /opt/opendj/bin/ldapmodify -h localhost -p 1389 -D "cn=manager" -w password -a -f /tmp/data.ldif

            # Step 3: Install Rust
            - name: Set up Rust
              uses: actions-rs/toolchain@v1
              with:
                  toolchain: stable
                  profile: minimal

            # Step 4: Build the Rust project
            - name: Build
              run: cargo build --verbose

            # Step 5: Run unit tests
            - name: Install llvm-tools and cargo-llvm-cov
              run: |
                  rustup component add llvm-tools-preview
                  cargo install cargo-llvm-cov
        
            - name: Run coverage
              run: |
                  cargo llvm-cov --lcov --output-path lcov.info
        
            - name: Upload coverage to Codecov
              uses: codecov/codecov-action@v5
              with:
                  files: lcov.info
                  flags: unittests
                  fail_ci_if_error: true
                  token: ${{ secrets.CODECOV_TOKEN }}

            # Check that there are no SemVer violations before releasing.
            # https://github.com/obi1kenobi/cargo-semver-checks
            - name: Check semver
              uses: obi1kenobi/cargo-semver-checks-action@v2
              with:
                  feature-group: default-features
                  features: pool

            # Another check with the mutually exclusive tls-rustls feature enabled.
            - name: Check semver
              uses: obi1kenobi/cargo-semver-checks-action@v2
              with:
                  feature-group: only-explicit-features
                  features: tls-rustls,pool

            - name: Deploy to crates.io
              run: cargo publish
              env:
                  CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_TOKEN }}