mirror of
https://github.com/LemmyNet/lemmy.git
synced 2026-01-19 21:00:46 -06:00
* Upgrading ts-rs, and adding feature flag. - Lets us remove all the ts-optionals on every field. - Should speed up compilation, and this feature is only needed for lemmy-js-client. - Fixes #5741 * Removing ts_optional_fields from enums * Updating translations. * Fix tests * Fixing translations * Adding ts-rs feature to ts_bindings script * Consolidating optional fields and export to one line. * Dont export federation_queue_state
29 lines
724 B
Bash
Executable File
29 lines
724 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
CWD="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
|
|
|
|
cd "$CWD/../"
|
|
|
|
PACKAGE="$1"
|
|
TEST="$2"
|
|
|
|
source scripts/start_dev_db.sh
|
|
|
|
# tests are executed in working directory crates/api (or similar),
|
|
# so to load the config we need to traverse to the repo root
|
|
export LEMMY_CONFIG_LOCATION=$(pwd)/config/config.hjson
|
|
export RUST_BACKTRACE=1
|
|
export LEMMY_TEST_FAST_FEDERATION=1 # by default, the persistent federation queue has delays in the scale of 30s-5min
|
|
|
|
if [ -n "$PACKAGE" ]; then
|
|
cargo test -p $PACKAGE --features full --no-fail-fast $TEST
|
|
else
|
|
cargo test --workspace --features full --no-fail-fast
|
|
fi
|
|
|
|
# Add this to do printlns: -- --nocapture
|
|
|
|
pg_ctl stop --silent
|
|
rm -rf $PGDATA
|