postgrest 1.6.0

PostgREST client-side library
Documentation
name: CI

on: pull_request

jobs:
  test:
    name: Test

    strategy:
      matrix:
        # macos-latest doesn't have docker-compose, no manifest for windows-latest
        platform: [ubuntu-latest]

    runs-on: ${{ matrix.platform }}

    steps:
      - uses: actions/checkout@v2

      - name: Build the stack
        run: docker-compose -f ./tests/db/docker-compose.yml up -d

      - name: Set up toolchain
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true
          components: rustfmt, clippy

      - name: Cache cargo registry
        uses: actions/cache@v1
        with:
          path: ~/.cargo/registry
          key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}

      - name: Cache cargo index
        uses: actions/cache@v1
        with:
          path: ~/.cargo/git
          key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}

      - name: Cache cargo target dir
        uses: actions/cache@v1
        with:
          path: target
          key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}

      - name: Build
        uses: actions-rs/cargo@v1
        with:
          command: build
          args: --release --all-features

      - name: Run tests
        uses: actions-rs/cargo@v1
        with:
          command: test

      - name: Run rustfmt
        uses: actions-rs/cargo@v1
        with:
          command: fmt
          args: --all -- --check

      - name: Run clippy
        uses: actions-rs/cargo@v1
        with:
          command: clippy
          args: -- -D warnings