Fixing travis, adding a test.sh script.

This commit is contained in:
Dessalines 2020-07-10 14:16:42 -04:00
parent 80aef61aed
commit 181374d2cc
3 changed files with 7 additions and 4 deletions

2
.travis.yml vendored
View file

@ -24,7 +24,7 @@ script:
- cargo clippy -- -D clippy::style -D clippy::correctness -D clippy::complexity -D clippy::perf - cargo clippy -- -D clippy::style -D clippy::correctness -D clippy::complexity -D clippy::perf
- cargo install diesel_cli --no-default-features --features postgres --force - cargo install diesel_cli --no-default-features --features postgres --force
- diesel migration run - diesel migration run
- cargo test - cargo test --workspace
env: env:
global: global:
- DATABASE_URL=postgres://lemmy:password@localhost:5432/lemmy - DATABASE_URL=postgres://lemmy:password@localhost:5432/lemmy

View file

@ -7,9 +7,7 @@ following commands in the `server` subfolder:
```bash ```bash
psql -U lemmy -c "DROP SCHEMA public CASCADE; CREATE SCHEMA public;" psql -U lemmy -c "DROP SCHEMA public CASCADE; CREATE SCHEMA public;"
export DATABASE_URL=postgres://lemmy:password@localhost:5432/lemmy ./test.sh
diesel migration run
RUST_TEST_THREADS=1 cargo test --workspace
``` ```
### Federation ### Federation

5
server/test.sh vendored Executable file
View file

@ -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