-
Notifications
You must be signed in to change notification settings - Fork 26
/
.travis.yml
48 lines (46 loc) · 1.22 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
language: rust
rust: stable
cache: cargo
matrix:
include:
- name: cargo fmt
cache: false
install:
- rustup component add rustfmt
script:
- cargo fmt --all -- --check
- name: cargo clippy
install:
- rustup component add clippy
script:
- cargo clippy -- -D warnings
- name: Check for known vulnerabilities in our dependency tree
install:
# Use --force to automatically update when a new version is available
- cargo install --force cargo-audit
script:
- cargo audit
- name: cargo build
script:
- cargo build
- name: cargo test
services:
- docker
before_install:
- >
[[ "$(diesel --version)" == "diesel 1.4.0" ]]
|| cargo install diesel_cli --no-default-features --features postgres
env:
global:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
- POSTGRES_DB=realword
- POSTGRES_PORT=5434
before_script:
- ./scripts/init_db.sh
script:
- ./scripts/run_tests.sh
after_success: |
bash <(curl https://raw.githubusercontent.com/xd009642/tarpaulin/master/travis-install.sh)
cargo tarpaulin --all --forward --out Xml
bash <(curl -s https://codecov.io/bash)