2019-04-06 08:54:45 -06:00
|
|
|
language: rust
|
|
|
|
rust:
|
|
|
|
- stable
|
|
|
|
matrix:
|
|
|
|
allow_failures:
|
|
|
|
- rust: nightly
|
|
|
|
fast_finish: true
|
2019-11-19 16:58:38 -07:00
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- /home/travis/.cargo
|
|
|
|
before_cache:
|
|
|
|
- rm -rf /home/travis/.cargo/registry
|
2019-04-06 09:27:35 -06:00
|
|
|
before_script:
|
2019-12-28 14:24:57 -07: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 04:47:11 -07:00
|
|
|
- rustup component add clippy --toolchain stable-x86_64-unknown-linux-gnu
|
2019-04-06 09:40:32 -06:00
|
|
|
before_install:
|
2019-04-06 08:57:24 -06:00
|
|
|
- cd server
|
2019-04-06 09:40:32 -06:00
|
|
|
script:
|
2020-01-02 04:47:11 -07:00
|
|
|
# Default checks, but fail if anything is detected
|
|
|
|
- cargo clippy -- -D clippy::style -D clippy::correctness -D clippy::complexity -D clippy::perf
|
2019-11-19 16:54:00 -07:00
|
|
|
- cargo build
|
2019-12-28 14:49:38 -07:00
|
|
|
- diesel migration run
|
2019-11-19 16:54:00 -07:00
|
|
|
- cargo test
|
2019-12-28 14:42:20 -07:00
|
|
|
env:
|
2019-12-28 14:50:59 -07:00
|
|
|
- DATABASE_URL=postgres://lemmy:password@localhost:5432/lemmy
|
2019-04-06 10:25:18 -06:00
|
|
|
addons:
|
2019-04-06 11:01:02 -06:00
|
|
|
postgresql: "9.4"
|