Skip to content

Review routes

Review routes #42

Workflow file for this run

name: Rust
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-Dwarnings"
jobs:
clippy_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Clippy
run: |
cd backend
cargo clippy --all-targets --all-features
test:
name: Integration Tests
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: mysecretpassword
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- name: Build and run API
env:
DATABASE_URL: postgres://postgres:mysecretpassword@localhost:5432
run: |
cd backend
cargo install sqlx-cli --features postgres
slqx migrate run
cargo build
cargo sqlx prepare
cargo run & cargo test