sqlx_mock 0.1.2

A simple tool to test sqlx with postgres. It will automatically create a database and drop it after the test.
Documentation
name: build

on:
  push:
    branches: ['main']
  pull_request:
    branches: ['main']
  workflow_dispatch:
env:
  CARGO_TERM_COLOR: always

jobs:
  build:
    runs-on: ${{ matrix.platform }}
    strategy:
      matrix:
        platform: [ubuntu-latest]
    services:
      postgres:
        image: postgres:14.5
        env:
          POSTGRES_USER: postgres
          POSTGRES_PASSWORD: postgres
          POSTGRES_DB: test
        ports:
          - 5432:5432
        # Set health checks to wait until postgres has started
        options: >-
          --health-cmd pg_isready
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0
      - name: Install Rust
        run: rustup toolchain install stable --component llvm-tools-preview
      - name: Install cargo-llvm-cov
        uses: taiki-e/install-action@cargo-llvm-cov
      - name: install nextest
        uses: taiki-e/install-action@nextest
      - uses: Swatinem/rust-cache@v1
      - name: Check code format
        run: cargo fmt -- --check
      - name: Check the package for errors
        run: cargo check --all
      - name: Lint rust sources
        run: cargo clippy --all-targets --all-features --tests --benches -- -D warnings
      - name: Execute rust tests
        run: cargo nextest run --all-features