Skip to content

Commit 10337d6

Browse files
authored
add travis (#4)
* add travis * update ci
1 parent 5844d98 commit 10337d6

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

.travis.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
language: rust
2+
cache: cargo
3+
sudo: required
4+
5+
os:
6+
- linux
7+
- windows
8+
- osx
9+
10+
rust:
11+
- stable
12+
- nightly
13+
14+
# Dependencies of kcov, used by coverage
15+
addons:
16+
apt:
17+
packages:
18+
- libcurl4-openssl-dev
19+
- libelf-dev
20+
- libdw-dev
21+
- binutils-dev
22+
- cmake # also required for cargo-update
23+
sources:
24+
- kalakris-cmake
25+
26+
matrix:
27+
allow_failures:
28+
- rust: nightly
29+
fast_finish: true
30+
31+
install:
32+
- if [[ $TRAVIS_RUST_VERSION == "stable" ]]; then rustup component add rustfmt; fi
33+
- if [[ $TRAVIS_RUST_VERSION == "stable" ]]; then rustup component add clippy; fi
34+
35+
before_script:
36+
- export PATH=$HOME/.cargo/bin:$PATH
37+
- cargo install cargo-update || echo "cargo-update already installed"
38+
- cargo install cargo-travis || echo "cargo-travis already installed"
39+
- cargo install-update -a # update outdated cached binaries
40+
41+
script:
42+
- cd kamyu104 && cargo test --verbose --all
43+
44+
after_success:
45+
# measure code coverage and upload to coveralls.io
46+
- cargo coveralls
47+
env:
48+
global:
49+
- RUST_BACKTRACE=1

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# rust-leetcode-solutions
22

3+
[![Build Status](https://travis-ci.org/rust-interview/rust-leetcode-solutions.svg?branch=master)](https://travis-ci.org/Fullstop000/wickdb)
4+
[![Coverage Status](https://coveralls.io/repos/github/rust-interview/rust-leetcode-solutions/badge.svg?branch=master)](https://coveralls.io/github/Fullstop000/wickdb?branch=master)
5+
36
## [kamyu104's](https://github.com/kamyu104/LeetCode-Solutions)
47
```
58
cd kamyu104

0 commit comments

Comments
 (0)