2019-04-06 14:54:45 +00:00
|
|
|
language: rust
|
|
|
|
rust:
|
|
|
|
- stable
|
|
|
|
matrix:
|
|
|
|
allow_failures:
|
|
|
|
- rust: nightly
|
|
|
|
fast_finish: true
|
2020-01-03 17:09:06 +00:00
|
|
|
cache: cargo
|
2019-11-19 23:58:38 +00:00
|
|
|
before_cache:
|
2020-01-03 17:58:50 +00: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 15:27:35 +00:00
|
|
|
before_script:
|
2019-12-28 21:24:57 +00: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 11:47:11 +00:00
|
|
|
- rustup component add clippy --toolchain stable-x86_64-unknown-linux-gnu
|
2019-04-06 15:40:32 +00:00
|
|
|
before_install:
|
2019-04-06 14:57:24 +00:00
|
|
|
- cd server
|
2019-04-06 15:40:32 +00:00
|
|
|
script:
|
2020-01-02 11:47:11 +00:00
|
|
|
# Default checks, but fail if anything is detected
|
2019-11-19 23:54:00 +00:00
|
|
|
- cargo build
|
2020-01-14 14:42:11 +00:00
|
|
|
- cargo clippy -- -D clippy::style -D clippy::correctness -D clippy::complexity -D clippy::perf
|
2020-01-14 14:55:05 +00:00
|
|
|
- cargo install diesel_cli --no-default-features --features postgres --force
|
2019-12-28 21:49:38 +00:00
|
|
|
- diesel migration run
|
2019-11-19 23:54:00 +00:00
|
|
|
- cargo test
|
2019-12-28 21:42:20 +00:00
|
|
|
env:
|
2020-01-14 14:23:41 +00:00
|
|
|
global:
|
|
|
|
- DATABASE_URL=postgres://lemmy:password@localhost:5432/lemmy
|
|
|
|
- RUST_TEST_THREADS=1
|
2020-01-14 02:02:04 +00:00
|
|
|
|
2019-04-06 16:25:18 +00:00
|
|
|
addons:
|
2019-04-06 17:01:02 +00:00
|
|
|
postgresql: "9.4"
|