diff options
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | docs/src/contributing_tests.md | 4 | ||||
-rwxr-xr-x | server/test.sh | 5 |
3 files changed, 7 insertions, 4 deletions
diff --git a/.travis.yml b/.travis.yml index 602a8613..71fbac3f 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 ccce6725..d4168e19 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 00000000..9a8e445b --- /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 |