Only run tests once in CI (#117)
* Only run tests once in CI We run codecov after successful test runs. This ~doubles the length of CI jobs, sicne the codecov run reproduces nearly all tests. To avoid this, we just run the codecov tests as part of our normal test script. * s/before_script/install * only publish coverage after test completes * run all tests for coverage * remove hpack from coverage * fix tyop * cargo clean
This commit is contained in:
23
.travis.yml
23
.travis.yml
@@ -17,15 +17,25 @@ rust:
|
|||||||
- beta
|
- beta
|
||||||
- stable
|
- stable
|
||||||
|
|
||||||
|
install:
|
||||||
|
- bash <(curl https://raw.githubusercontent.com/xd009642/tarpaulin/master/travis-install.sh)
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- cargo clean
|
||||||
|
|
||||||
script:
|
script:
|
||||||
# Run tests
|
# Test examples in README.
|
||||||
- cargo test
|
- cargo build --tests && rustdoc --test README.md -L target/debug/deps
|
||||||
# Test examples in readme
|
|
||||||
- rustdoc --test README.md -L target/debug/deps
|
# Run tests, uploading results to codecov..
|
||||||
|
# hpack tests are _super_ slow in coverage, so skip them here.
|
||||||
|
- cargo tarpaulin --out Xml -- --skip hpack
|
||||||
|
|
||||||
|
# Test _only_ hpack.
|
||||||
|
- cargo test -- hpack
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
- bash <(curl https://raw.githubusercontent.com/xd009642/tarpaulin/master/travis-install.sh)
|
- bash <(curl -Ls https://codecov.io/bash)
|
||||||
- cargo tarpaulin --out Xml -- --skip hpack && bash <(curl -s https://codecov.io/bash)
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# allow_failures:
|
# allow_failures:
|
||||||
@@ -45,6 +55,7 @@ jobs:
|
|||||||
repo: carllerche/h2
|
repo: carllerche/h2
|
||||||
rust: nightly
|
rust: nightly
|
||||||
after_success: skip
|
after_success: skip
|
||||||
|
|
||||||
- stage: fmt
|
- stage: fmt
|
||||||
rust: nightly
|
rust: nightly
|
||||||
install: cargo install --force rustfmt-nightly
|
install: cargo install --force rustfmt-nightly
|
||||||
|
|||||||
Reference in New Issue
Block a user