forked from bluejekyll/pg-extend-rs
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
68 lines (60 loc) · 1.79 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
60
61
62
63
64
65
66
67
68
sudo: required
dist: xenial
language: rust
addons:
postgresql: "10"
apt:
packages:
- postgresql-server-dev-10
services:
- postgresql
env:
global:
- PGPORT=5432
matrix:
include:
# parallel builds for tests
- rust: stable
env: NAME=stable
PG_BASE_INCLUDE=$(pg_config --includedir)
PG_INCLUDE_PATH=${PG_BASE_INCLUDE}/10/server
RUST_BACKTRACE=full
POSTGRES_TEST_DB=travis_ci_test
POSTGRES_URL=postgres://postgres@localhost:5432/${POSTGRES_TEST_DB}
before_install:
- rustup component add rustfmt
- psql -c 'create database travis_ci_test;' -U postgres
script:
- cargo test
# macos
- os: osx
rust: stable
env: NAME=macOS
PG_BASE_INCLUDE=$(pg_config --includedir)
PG_INCLUDE_PATH=${PG_BASE_INCLUDE}/server
RUST_BACKTRACE=full
POSTGRES_TEST_DB=travis_ci_test
POSTGRES_URL=postgres://postgres@localhost:5432/${POSTGRES_TEST_DB}
before_install:
- rustup component add rustfmt
- $(pg_config --bindir)/pg_ctl -D travis_ci_test initdb
- $(pg_config --bindir)/pg_ctl -D travis_ci_test start
- $(pg_config --bindir)/createuser -s postgres
- $(pg_config --bindir)/psql -c 'create database travis_ci_test;' -U postgres
script:
- cargo test
# - cargo test -- --ignored
# clippy
- rust: stable
env: NAME=clippy
PG_BASE_INCLUDE=$(pg_config --includedir)
PG_INCLUDE_PATH=${PG_BASE_INCLUDE}/10/server
RUST_BACKTRACE=full
before_install:
- rustup component add clippy
- rustup component add rustfmt
script:
- cargo clippy -- -D warnings
script:
- cargo test
#after_success: scripts/run_kcov.sh