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
1 changed files with 6 additions and 6 deletions
12
README.md
12
README.md
|
@ -124,13 +124,13 @@ A minimal Travis setup could look like this:
|
||||||
```yaml
|
```yaml
|
||||||
language: rust
|
language: rust
|
||||||
cache: cargo
|
cache: cargo
|
||||||
before_script: (cargo install rustfmt || true)
|
before_script:
|
||||||
|
- export PATH="$PATH:$HOME/.cargo/bin"
|
||||||
|
- which rustfmt || cargo install rustfmt
|
||||||
script:
|
script:
|
||||||
- |
|
- cargo fmt -- --write-mode=diff
|
||||||
export PATH=$PATH:~/.cargo/bin &&
|
- cargo build
|
||||||
cargo fmt -- --write-mode=diff &&
|
- cargo test
|
||||||
cargo build &&
|
|
||||||
cargo test
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that using `cache: cargo` is optional but highly recommended to speed up the installation.
|
Note that using `cache: cargo` is optional but highly recommended to speed up the installation.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue