add basic backend workflow
All checks were successful
Backend Actions / build (push) Successful in 2m56s
All checks were successful
Backend Actions / build (push) Successful in 2m56s
This commit is contained in:
@ -8,9 +8,7 @@ start:
|
||||
cargo run --features shutdown 2>&1 > logs/nuchat.log
|
||||
|
||||
test:
|
||||
cargo run --features shutdown -- --port 7001 2>&1 > logs/nuchat.log &
|
||||
cargo test
|
||||
curl -s -X POST localhost:7001/admin/shutdown
|
||||
./scripts/test.sh
|
||||
|
||||
default := 'run'
|
||||
watch CMD=default:
|
||||
|
||||
14
backend/scripts/test.sh
Executable file
14
backend/scripts/test.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
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 test | tee logs/test-output.log
|
||||
Reference in New Issue
Block a user