Files
nuchat/backend/scripts/test.sh
Fergus Molloy e90ffabf8b
Some checks failed
Backend Actions / test (push) Failing after 1m43s
Backend Actions / build (push) Successful in 2m2s
Backend Actions / check (push) Successful in 39s
check for nextest before running tests
2025-07-24 17:42:31 +01:00

21 lines
473 B
Bash
Executable File

#!/usr/bin/env bash
if [ ! $(command -v cargo-nextest 2>&1 > /dev/null ) ]; then
echo "Command not found cargo-nextest"
echo "Try installing with cargo install cargo-nextest"
exit 1
fi
if [ ! -d logs ]; then
mkdir logs
fi
# ensure server is not started
curl -s -X POST localhost:7001/admin/shutdown 2>&1 > /dev/null
# start server
cargo run --features shutdown -- --port 7001 2>&1 > logs/nuchat.log &
# run tests
cargo nextest run 2>&1 | tee logs/test-output.log