Skip to content

Fix RBAC clippy on stable #52

Fix RBAC clippy on stable

Fix RBAC clippy on stable #52

Workflow file for this run

name: CI
on:
push:
branches: ["main", "master"]
pull_request:
jobs:
rust-backend-tests:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt, clippy
- name: Check Rust formatting
run: |
cargo fmt --manifest-path rust/iscy-backend/Cargo.toml -- --check
- name: Run Rust clippy
run: |
cargo clippy --manifest-path rust/iscy-backend/Cargo.toml --all-targets -- -D warnings
- name: Run Rust backend tests
run: |
cargo test --manifest-path rust/iscy-backend/Cargo.toml
rust-bootstrap-smoke:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Run Rust DB/bootstrap HTTP smoke
run: |
make rust-smoke
nix-rust-smoke:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v30
with:
extra_nix_config: |
experimental-features = nix-command flakes
- name: Run Nix Rust app smoke
run: |
tmpdir="$(mktemp -d)"
db_path="$tmpdir/iscy-nix-smoke.sqlite3"
cookie_file="$tmpdir/iscy-nix-smoke.cookies"
export DATABASE_URL="sqlite:////${db_path#/}"
export RUST_BACKEND_BIND="127.0.0.1:19001"
export RUST_BACKEND_URL="http://127.0.0.1:19001"
nix run .#iscy-backend -- init-demo
nix run .#iscy-backend >"$tmpdir/iscy-backend.log" 2>&1 &
pid="$!"
trap 'kill "$pid" >/dev/null 2>&1 || true' EXIT
for _ in $(seq 1 60); do
if curl -fsS "$RUST_BACKEND_URL/health/live" >/dev/null 2>&1; then
break
fi
if ! kill -0 "$pid" >/dev/null 2>&1; then
cat "$tmpdir/iscy-backend.log"
exit 1
fi
sleep 1
done
curl -fsS "$RUST_BACKEND_URL/health/live" >/dev/null
curl -fsS -c "$cookie_file" -H "content-type: application/json" -d '{"tenant_id":1,"username":"admin","password":"Admin123!"}' "$RUST_BACKEND_URL/api/v1/auth/sessions" >/dev/null
curl -fsS -b "$cookie_file" "$RUST_BACKEND_URL/api/v1/auth/session" >/dev/null
curl -fsS -b "$cookie_file" "$RUST_BACKEND_URL/dashboard/" >/dev/null
curl -fsS -H "x-iscy-tenant-id: 1" -H "x-iscy-user-id: 1" "$RUST_BACKEND_URL/api/v1/catalog/domains" >/dev/null
curl -fsS -H "x-iscy-tenant-id: 1" -H "x-iscy-user-id: 1" "$RUST_BACKEND_URL/api/v1/requirements" >/dev/null
curl -fsS -H "x-iscy-tenant-id: 1" -H "x-iscy-user-id: 1" "$RUST_BACKEND_URL/api/v1/product-security/overview" >/dev/null
docker-config:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Validate docker compose files
run: |
cp .env.example .env
docker compose -f docker-compose.yml config
docker compose -f docker-compose.yml -f docker-compose.llm.yml config
docker compose -f docker-compose.yml -f docker-compose.stage.yml config
docker compose -f docker-compose.yml -f docker-compose.prod.yml config
docker compose -f docker-compose.yml -f docker-compose.prod.yml -f docker-compose.llm.yml config