forked from Plume-org/Plume
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
59 lines (58 loc) · 1.87 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
language: rust
rust:
- nightly-2018-12-06
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 front"
script: (cargo web -h || cargo install cargo-web) && cd plume-front && cargo web check
- 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}" --release
- 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}" --release
- 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' RUST_TEST_THREADS=1
before_script: psql -c 'create database plume_tests;' -U postgres
script:
- |
cargo test --features "${FEATURES}" --no-default-features --all --exclude plume-front &&
./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' RUST_TEST_THREADS=1
script:
- |
cargo test --features "${FEATURES}" --no-default-features --all --exclude plume-front &&
./script/compute_coverage.sh