atmosphere 0.4.1

A lightweight SQL framework for sustainable database reliant systems
Documentation
name: CI

on:
  push:
    branches: ["main"]
  pull_request:

env:
  MINIMUM_LINE_COVERAGE_PERCENT: 0

jobs:
  fmt:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - run: rustup update && rustup component add rustfmt
      - run: cargo fmt --check --all

  clippy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - run: rustup update && rustup component add clippy
      - uses: Swatinem/rust-cache@v2
      - run: cargo clippy --all-targets --workspace --features postgres -- -D warnings -D clippy::all

  # Examples require the `sqlite` feature
  clippy-examples:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - run: rustup update && rustup component add clippy
      - uses: Swatinem/rust-cache@v2
      - run: cargo clippy --all-targets --workspace --features sqlite -- -D warnings -D clippy::all

  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
        with:
          lfs: "true"
      - uses: isbang/compose-action@v2
        with:
          compose-file: "./tests/postgres.yml"
      - run: rustup update
      - uses: Swatinem/rust-cache@v2
      - run: cargo test --workspace --features postgres
        env:
          RUST_BACKTRACE: 1
          DATABASE_URL: postgres://atmosphere:atmosphere@localhost:5432

  typos:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - uses: Swatinem/rust-cache@v2
      - run: cargo install typos-cli || true
      - run: typos