Skip to content

Commit 4b5654a

Browse files
committed
Better CI
1 parent e3a3237 commit 4b5654a

File tree

2 files changed

+59
-81
lines changed

2 files changed

+59
-81
lines changed

.travis.yml

Lines changed: 59 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,67 @@
11
language: rust
2-
sudo: required
3-
dist: trusty
4-
addons:
5-
apt:
6-
packages:
7-
- libssl-dev
82
cache: cargo
93
rust:
104
- stable
115
- beta
126
- nightly
13-
matrix:
7+
os: linux
8+
9+
# always test things that aren't pushes (like PRs)
10+
# never test tags or pushes to non-master branches (wait for PR)
11+
# https://github.com/travis-ci/travis-ci/issues/2200#issuecomment-441395545)
12+
if: type != push OR (tag IS blank AND branch = master)
13+
14+
jobs:
1415
allow_failures:
1516
- rust: nightly
16-
after_success: |
17-
if [[ "$TRAVIS_RUST_VERSION" == stable ]]; then
18-
bash <(curl https://raw.githubusercontent.com/xd009642/tarpaulin/master/travis-install.sh)
19-
cargo tarpaulin --out Xml
20-
bash <(curl -s https://codecov.io/bash)
21-
fi
17+
include:
18+
- &check
19+
stage: check # do a pre-screen to make sure this is even worth testing
20+
script: cargo check --all-targets
21+
rust: stable
22+
- <<: *check # also test oldest known-good stable
23+
rust: 1.31.1
24+
- stage: test
25+
rust: stable
26+
os: osx
27+
- rust: stable
28+
os: windows
29+
- stage: lint # we lint on beta to future-proof
30+
name: "Rust: beta, rustfmt"
31+
rust: beta
32+
script:
33+
- rustup component add rustfmt-preview
34+
- cargo fmt -v -- --check
35+
- name: "Rust: nightly, rustfmt" # and on nightly with allow_fail
36+
rust: nightly
37+
script:
38+
- rustup component add rustfmt-preview
39+
- cargo fmt -v -- --check
40+
- name: "Rust: beta, clippy"
41+
rust: beta
42+
script:
43+
- rustup component add clippy-preview
44+
- touch ./src/lib.rs && cargo clippy -- -D warnings
45+
- name: "Rust: nightly, clippy"
46+
rust: nightly
47+
script:
48+
- rustup component add clippy-preview
49+
- touch ./src/lib.rs && cargo clippy -- -D warnings
50+
- stage: coverage
51+
sudo: required
52+
addons:
53+
apt:
54+
packages:
55+
- libssl-dev
56+
rust: nightly
57+
env: CACHE_NAME=coverage
58+
script:
59+
- RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo install cargo-tarpaulin || true
60+
- cargo tarpaulin --out Xml
61+
- bash <(curl -s https://codecov.io/bash)
62+
- cargo clean -p msql-srv # ensure we don't cache build for coverage
63+
stages:
64+
- check
65+
- test
66+
- lint
67+
- coverage

appveyor.yml

Lines changed: 0 additions & 68 deletions
This file was deleted.

0 commit comments

Comments
 (0)