lemmy/.travis.yml

35 lines
1.0 KiB
YAML
Raw Normal View History

2019-04-06 10:54:45 -04:00
language: rust
rust:
- stable
matrix:
allow_failures:
- rust: nightly
fast_finish: true
2020-01-03 12:09:06 -05:00
cache: cargo
2019-11-19 18:58:38 -05:00
before_cache:
2020-01-03 12:58:50 -05:00
- rm -rfv target/debug/incremental/lemmy_server-*
- rm -rfv target/debug/.fingerprint/lemmy_server-*
- rm -rfv target/debug/build/lemmy_server-*
- rm -rfv target/debug/deps/lemmy_server-*
- rm -rfv target/debug/lemmy_server.d
2019-04-06 11:27:35 -04:00
before_script:
2019-12-28 16:24:57 -05:00
- psql -c "create user lemmy with password 'password' superuser;" -U postgres
- psql -c 'create database lemmy with owner lemmy;' -U postgres
2020-01-02 06:47:11 -05:00
- rustup component add clippy --toolchain stable-x86_64-unknown-linux-gnu
2019-04-06 11:40:32 -04:00
before_install:
2019-04-06 10:57:24 -04:00
- cd server
2019-04-06 11:40:32 -04:00
script:
2020-01-02 06:47:11 -05:00
# Default checks, but fail if anything is detected
2019-11-19 18:54:00 -05:00
- cargo build
2020-01-14 09:42:11 -05:00
- cargo clippy -- -D clippy::style -D clippy::correctness -D clippy::complexity -D clippy::perf
- cargo install diesel_cli --no-default-features --features postgres --force
2019-12-28 16:49:38 -05:00
- diesel migration run
2019-11-19 18:54:00 -05:00
- cargo test
2019-12-28 16:42:20 -05:00
env:
2020-01-14 09:23:41 -05:00
global:
- DATABASE_URL=postgres://lemmy:password@localhost:5432/lemmy
- RUST_TEST_THREADS=1
2019-04-06 12:25:18 -04:00
addons:
2019-04-06 13:01:02 -04:00
postgresql: "9.4"