steps: backend: image: rust:1.93-bookworm environment: DATABASE_URL: postgres://postgres:postgres@postgres:5432/likwid_ci RUST_BACKTRACE: 1 commands: - rustup component add rustfmt clippy - cargo install -j 2 sqlx-cli --version 0.8.6 --locked --no-default-features --features postgres,rustls - | cd backend ok=0 i=1 while [ "$i" -le 30 ]; do if sqlx migrate run; then ok=1 break fi echo "sqlx migrate run failed (attempt ${i}/30); waiting for postgres..." sleep 1 i=$((i + 1)) done if [ "$ok" -ne 1 ]; then echo "sqlx migrate run failed after 30 attempts" exit 1 fi cargo fmt --all -- --check cargo clippy -j 2 --all-targets --all-features -- -D warnings cargo test -j 2 --all cargo build -j 2 --release frontend: image: node:20-bookworm commands: - | cd frontend npm ci npm run build services: postgres: image: postgres:16 environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: likwid_ci