Update travis section of README
This fixes the example travis config to not ignore install errors for rustfmt, while still not trying to overwrite a previous install. In addition, this rewrites the script: section to include multiple commands in a way that travis can more accurately indicate which failed and which succeeded.
This commit is contained in:
parent
7ad352239a
commit
a0560e3496
12
README.md
12
README.md
@ -124,13 +124,13 @@ A minimal Travis setup could look like this:
|
||||
```yaml
|
||||
language: rust
|
||||
cache: cargo
|
||||
before_script: (cargo install rustfmt || true)
|
||||
before_script:
|
||||
- export PATH="$PATH:$HOME/.cargo/bin"
|
||||
- which rustfmt || cargo install rustfmt
|
||||
script:
|
||||
- |
|
||||
export PATH=$PATH:~/.cargo/bin &&
|
||||
cargo fmt -- --write-mode=diff &&
|
||||
cargo build &&
|
||||
cargo test
|
||||
- cargo fmt -- --write-mode=diff
|
||||
- cargo build
|
||||
- cargo test
|
||||
```
|
||||
|
||||
Note that using `cache: cargo` is optional but highly recommended to speed up the installation.
|
||||
|
Loading…
x
Reference in New Issue
Block a user