Browse Source

Fixing travis, adding a test.sh script.

feature/settings-cleanup
Dessalines 1 year ago
parent
commit
b2dd417e3b
  1. 2
      .travis.yml
  2. 4
      docs/src/contributing_tests.md
  3. 5
      server/test.sh

2
.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:[email protected]:5432/lemmy

4
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:[email protected]:5432/lemmy
diesel migration run
RUST_TEST_THREADS=1 cargo test --workspace
./test.sh
```
### Federation

5
server/test.sh

@ -0,0 +1,5 @@
#!/bin/sh
export DATABASE_URL=postgres://lemmy:[email protected]:5432/lemmy
diesel migration run
export LEMMY_DATABASE_URL=postgres://lemmy:[email protected]:5432/lemmy
RUST_TEST_THREADS=1 cargo test --workspace
Loading…
Cancel
Save