Plume/.travis.yml

57 lines
1.6 KiB
YAML
Raw Normal View History

2018-04-30 23:15:07 +02:00
language: rust
rust:
- nightly-2018-07-17
cache:
cargo: true
directories:
- kcov-master
sudo: true
dist: trusty
services: postgres
addons:
apt:
packages:
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- cmake
- gcc
- binutils-dev
- zlib1g-dev
- libiberty-dev
stages:
- build
- test and coverage
jobs:
include:
- stage: build
name: "Build with postgresql"
env:
- MIGRATION_DIR=migrations/postgres FEATURES=postgres DATABASE_URL=postgres://postgres@localhost/plume
script: cargo build --no-default-features --features="${FEATURES}"
- stage: build
name: "Build with sqlite"
env:
- MIGRATION_DIR=migrations/sqlite FEATURES=sqlite DATABASE_URL=plume.sqlite3
script: cargo build --no-default-features --features="${FEATURES}"
- stage: test and coverage
name: "Test with potgresql backend"
env:
- MIGRATION_DIR=migrations/postgres FEATURES=postgres DATABASE_URL=postgres://postgres@localhost/plume_tests
- RUSTFLAGS='-C link-dead-code'
before_script: psql -c 'create database plume_tests;' -U postgres
script:
- |
cargo test --features "${FEATURES}" --no-default-features --all &&
./script/compute_coverage.sh
- stage: test and coverage
name: "Test with Sqlite backend"
env:
- MIGRATION_DIR=migrations/sqlite FEATURES=sqlite DATABASE_URL=plume.sqlite3
- RUSTFLAGS='-C link-dead-code'
script:
- |
cargo test --features "${FEATURES}" --no-default-features --all &&
./script/compute_coverage.sh