Tests infrastructure for plume-models (#302)
First step for testing `plume-models`. I only added one test for the moment, but we should add more in future PRs.
This commit is contained in:
+44
-7
@@ -1,10 +1,47 @@
|
||||
language: rust
|
||||
env:
|
||||
matrix:
|
||||
- MIGRATION_DIR=migrations/postgres FEATURES=postgres DATABASE_URL=postgres://postgres@localhost/plume
|
||||
- MIGRATION_DIR=migrations/sqlite FEATURES=sqlite DATABASE_URL=plume.sqlite3
|
||||
rust:
|
||||
- nightly
|
||||
- nightly-2018-07-17
|
||||
cache: cargo
|
||||
script:
|
||||
- cargo build --no-default-features --features="${FEATURES}"
|
||||
sudo: true
|
||||
dist: trusty
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libcurl4-openssl-dev
|
||||
- libelf-dev
|
||||
- libdw-dev
|
||||
- cmake
|
||||
- gcc
|
||||
- binutils-dev
|
||||
- zlib1g-dev
|
||||
- libiberty-dev
|
||||
jobs:
|
||||
include:
|
||||
- stage: test and build
|
||||
env:
|
||||
- RUSTFLAGS='-C link-dead-code'
|
||||
script: cargo test --features sqlite --no-default-features --all
|
||||
after_success:
|
||||
- |
|
||||
wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz &&
|
||||
tar xzf master.tar.gz &&
|
||||
cd kcov-master &&
|
||||
mkdir build &&
|
||||
cd build &&
|
||||
cmake .. &&
|
||||
make &&
|
||||
sudo make install &&
|
||||
cd ../.. &&
|
||||
rm -rf kcov-master &&
|
||||
for crate in plume plume_common plume_models plume_api plm lib; do for file in target/debug/$crate-*[^\.d]; do mkdir -p "target/cov/$(basename $file)"; kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$(basename $file)" "$file"; done; done &&
|
||||
bash <(curl -s https://codecov.io/bash) &&
|
||||
echo "Uploaded code coverage"
|
||||
- stage: test and build
|
||||
env:
|
||||
- MIGRATION_DIR=migrations/postgres FEATURES=postgres DATABASE_URL=postgres://postgres@localhost/plume
|
||||
script: cargo build --no-default-features --features="${FEATURES}"
|
||||
- stage: test and build
|
||||
env:
|
||||
- MIGRATION_DIR=migrations/sqlite FEATURES=sqlite DATABASE_URL=plume.sqlite3
|
||||
script: cargo build --no-default-features --features="${FEATURES}"
|
||||
|
||||
Reference in New Issue
Block a user