arrow-odbc 23.2.0

Read/Write Apache Arrow arrays from/to ODBC data sources.
Documentation
name: Build and test

on: [push, pull_request]

jobs:
  linux:
    name: Build & Test Linux
    runs-on: ubuntu-latest

    services:
      sqlserver:
        image: mcr.microsoft.com/mssql/server:2019-latest
        ports:
          - 1433:1433
        env:
          ACCEPT_EULA: Y
          SA_PASSWORD: My@Test@Password1

      postgres:
        image: postgres:17
        ports:
          - "5432:5432"
        env:
          POSTGRES_DB: test
          POSTGRES_USER: test
          POSTGRES_PASSWORD: test

    steps:
      - name: Checkout
        uses: actions/checkout@v6
      - name: Install latests rust toolchain
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          profile: minimal
          override: true
      # selecting a toolchain either by action or manual `rustup` calls should happen
      # before the plugin, as the cache uses the current rustc version as its cache key
      - name: Rust build cache
        uses: Swatinem/rust-cache@v2
      - name: Build
        run: cargo build
      - name: Install ODBC Drivers
        run: |
          apt-get update
          apt-get install -y unixodbc-dev odbc-postgresql msodbcsql18
          # Fix PostgreSQL driver paths
          sed --in-place 's/psqlodbca.so/\/usr\/lib\/x86_64-linux-gnu\/odbc\/psqlodbca.so/' /etc/odbcinst.ini
          sed --in-place 's/psqlodbcw.so/\/usr\/lib\/x86_64-linux-gnu\/odbc\/psqlodbcw.so/' /etc/odbcinst.ini
        shell: sudo bash {0}
      - name: Print odbcinst.ini
        run: cat /etc/odbcinst.ini
      - name: Test
        run: cargo test

  dependabot:
    needs: [linux]
    permissions:
      pull-requests: write
      contents: write
    runs-on: ubuntu-latest
    if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}}
    steps:
      - name: Merge Depenabot Pull Request
        run: gh pr merge --auto --rebase "$PR_URL"
        env:
          PR_URL: ${{github.event.pull_request.html_url}}
          GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}