lemmy/.travis.yml

36 lines
1 KiB
YAML
Raw Normal View History

2019-04-06 07:54:45 -07: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 15:58:38 -08: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
2020-01-03 12:56:53 -05:00
- cargo clean
2019-04-06 08:27:35 -07: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 12:47:11 +01:00
- rustup component add clippy --toolchain stable-x86_64-unknown-linux-gnu
2019-04-06 08:40:32 -07:00
before_install:
2019-04-06 07:57:24 -07:00
- cd server
2019-04-06 08:40:32 -07:00
script:
2020-01-02 12:47:11 +01:00
# Default checks, but fail if anything is detected
2019-11-19 15:54:00 -08: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 15:54:00 -08: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 09:25:18 -07:00
addons:
2019-04-06 10:01:02 -07:00
postgresql: "9.4"