Skip to content

fix

fix #262

Workflow file for this run

name: CI
on: [push, pull_request]
env:
DATABASE_URL: postgresql://localhost:5432/postgres?user=postgres&password=postgres
SQLX_OFFLINE: "true"
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo check
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: |
cargo install sqlx-cli
sqlx db create
sqlx migrate run
cargo test
rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt
override: true
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --all -- --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy
override: true
- uses: Swatinem/rust-cache@v2
- run: cargo clippy -- -D warnings