lemmy/.travis.yml
2020-01-03 12:56:53 -05:00

32 lines
973 B
YAML
Vendored

language: rust
rust:
- stable
matrix:
allow_failures:
- rust: nightly
fast_finish: true
cache: cargo
before_cache:
- rm -rfv target/debug/incremental/lemmy-*
- rm -rfv target/debug/.fingerprint/lemmy-*
- rm -rfv target/debug/build/lemmy-*
- rm -rfv target/debug/deps/liblemmy-*
- rm -rfv target/debug/deps/lemmy-*
- rm -rfv target/debug/{lemmy,liblemmy}.d
- cargo clean
before_script:
- psql -c "create user lemmy with password 'password' superuser;" -U postgres
- psql -c 'create database lemmy with owner lemmy;' -U postgres
- rustup component add clippy --toolchain stable-x86_64-unknown-linux-gnu
before_install:
- cd server
script:
# Default checks, but fail if anything is detected
- cargo clippy -- -D clippy::style -D clippy::correctness -D clippy::complexity -D clippy::perf
- cargo build
- diesel migration run
- cargo test
env:
- DATABASE_URL=postgres://lemmy:password@localhost:5432/lemmy
addons:
postgresql: "9.4"