mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-29 12:04:00 +00:00
36 lines
1 KiB
YAML
Vendored
36 lines
1 KiB
YAML
Vendored
language: rust
|
|
rust:
|
|
- stable
|
|
matrix:
|
|
allow_failures:
|
|
- rust: nightly
|
|
fast_finish: true
|
|
cache: cargo
|
|
before_cache:
|
|
- 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
|
|
- 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 build
|
|
- cargo clippy -- -D clippy::style -D clippy::correctness -D clippy::complexity -D clippy::perf
|
|
- cargo install diesel_cli --no-default-features --features postgres --force
|
|
- diesel migration run
|
|
- cargo test
|
|
env:
|
|
global:
|
|
- DATABASE_URL=postgres://lemmy:password@localhost:5432/lemmy
|
|
- RUST_TEST_THREADS=1
|
|
|
|
addons:
|
|
postgresql: "9.4"
|