diff --git a/.travis.yml b/.travis.yml index 602a8613d..71fbac3ff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,7 @@ script: - cargo clippy -- -D clippy::style -D clippy::correctness -D clippy::complexity -D clippy::perf - cargo install diesel_cli --no-default-features --features postgres --force - diesel migration run - - cargo test + - cargo test --workspace env: global: - DATABASE_URL=postgres://lemmy:password@localhost:5432/lemmy diff --git a/docs/src/contributing_tests.md b/docs/src/contributing_tests.md index ccce67250..d4168e190 100644 --- a/docs/src/contributing_tests.md +++ b/docs/src/contributing_tests.md @@ -7,9 +7,7 @@ following commands in the `server` subfolder: ```bash psql -U lemmy -c "DROP SCHEMA public CASCADE; CREATE SCHEMA public;" -export DATABASE_URL=postgres://lemmy:password@localhost:5432/lemmy -diesel migration run -RUST_TEST_THREADS=1 cargo test --workspace +./test.sh ``` ### Federation diff --git a/server/test.sh b/server/test.sh new file mode 100755 index 000000000..9a8e445b6 --- /dev/null +++ b/server/test.sh @@ -0,0 +1,5 @@ +#!/bin/sh +export DATABASE_URL=postgres://lemmy:password@localhost:5432/lemmy +diesel migration run +export LEMMY_DATABASE_URL=postgres://lemmy:password@localhost:5432/lemmy +RUST_TEST_THREADS=1 cargo test --workspace