-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.travis.yml
41 lines (36 loc) · 922 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
33
34
35
36
37
38
39
40
41
language: rust
rust:
- nightly
cache: cargo
sudo: false
branches:
only:
- master
install:
- curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
- source ~/.nvm/nvm.sh
- nvm install 10
before_script:
- npm install -g firebase-tools
- rustup component add rustfmt-preview
- which mdbook || cargo install --version "^0.2" --force mdbook
stages:
- test
- name: deploy
if: branch = master
jobs:
include:
- stage: test
name: "cargo test && mdbook test"
script:
# Test the source
- cargo test
# Use the libraries we just built as deps for mdbook tests
- mdbook test -L target/release/deps
- stage: test
name: "cargo fmt"
script: cargo fmt --all -- --check
- stage: deploy
name: "deploy to firebase"
script: mdbook build
after_success: firebase deploy --token=$FIREBASE_TOKEN