-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
32 lines (32 loc) · 1020 Bytes
/
.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
language: rust
rust:
- stable
cache: cargo
services:
- postgresql
before_install:
- |
if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(.md)|(.vc)|(.tc)|(.pm)|(.diff)|(.pl)|(.sh)|(.cmd)|(.hash)|(.cl)|(.yaml)|(.rule)|(.hckmap)|(.charset)|(.yml)|(.editorconfig)|(.gitattributes)|(.gitignore)|(.lock)|(.hcmask)'
then
echo "No code changes detected, skip the CI build."
exit
fi
install:
- rustup component add clippy
- rustup component add rustfmt
- nvm install 8
- npm install -g yarn
- (cargo install --list | grep 'diesel_cli') || cargo install diesel_cli --no-default-features --features postgres
- yarn
before_script:
- psql -c 'create database budgetron;' -U postgres
- cp .env.travis .env
- diesel migration run
- cargo build
script:
- yarn run webpack
- yarn tslint -c tslint.json 'web/src/**/*.ts{,x}' --exclude '**/*.scss.d.ts'
- yarn tsfmt --verify
- cargo clippy --all -- -D clippy::all
- cargo fmt --all -- --check
- cargo test