]> Untitled Git - lemmy.git/blob - scripts/test.sh
Adding script to upgrade deps, and check for unused ones.
[lemmy.git] / scripts / test.sh
1 #!/bin/sh
2 set -e
3
4 psql -U lemmy -d postgres -c "DROP DATABASE lemmy;"
5 psql -U lemmy -d postgres -c "CREATE DATABASE lemmy;"
6
7 export LEMMY_DATABASE_URL=postgres://lemmy:password@localhost:5432/lemmy
8 # tests are executed in working directory crates/api (or similar),
9 # so to load the config we need to traverse to the repo root
10 export LEMMY_CONFIG_LOCATION=../../config/config.hjson
11 RUST_BACKTRACE=1 \
12   cargo test --workspace --no-fail-fast