From: Dessalines Date: Fri, 10 Jul 2020 18:16:42 +0000 (-0400) Subject: Fixing travis, adding a test.sh script. X-Git-Url: http://these/git/ui/assets/static/%22%7B%7D/%22?a=commitdiff_plain;h=181374d2cc5f751f0e41a8c4cb938cad118a5a4d;p=lemmy.git Fixing travis, adding a test.sh script. --- 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