Files
lemmy/scripts/test.sh
Dessalines 42bd941f35 Upgrading ts-rs, and adding feature flag (#5777)
* 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
2025-06-12 16:30:48 +02:00

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