From 181374d2cc5f751f0e41a8c4cb938cad118a5a4d Mon Sep 17 00:00:00 2001 From: Dessalines Date: Fri, 10 Jul 2020 14:16:42 -0400 Subject: [PATCH] Fixing travis, adding a test.sh script. --- .travis.yml | 2 +- docs/src/contributing_tests.md | 4 +--- server/test.sh | 5 +++++ 3 files changed, 7 insertions(+), 4 deletions(-) create mode 100755 server/test.sh 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