async-postgres 0.5.1

A runtime-independent, asynchronous PostgreSQL client.
on: [push, pull_request]
name: Benchmark
jobs:
  benchmark:
    runs-on: ubuntu-latest
    services:
      postgres:
        image: postgres:10.8
        env:
          POSTGRES_USER: postgres
          POSTGRES_PASSWORD: postgres
          POSTGRES_DB: postgres
        ports:
          - 5432:5432
        volumes:
          - /var/run:/var/run/postgresql
        # needed because the postgres container does not provide a healthcheck
        options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
    steps:
      - name: Install psql
        run: |
          sudo apt-get update
          sudo apt-get install -y postgresql-client
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          override: true
      - name: Load test data
        run: psql -h localhost -U postgres -d postgres < tests/load-data.sql
        env:
          PGPASSWORD: "postgres"
      - name: Benchmark
        uses: actions-rs/cargo@v1
        with:
          command: test
          args: --release --test benchmark -- --nocapture
        env:
          TCP_URL: "postgresql:///postgres?host=localhost&user=postgres&password=postgres"
          UDS_URL: "postgresql:///postgres?host=/var/run&user=postgres&password=postgres"