mozillazg / rust-pinyin

汉字转拼音
https://docs.rs/pinyin/
MIT License
203 stars 24 forks source link

Improve travis ci codecov performance #32

Closed hanabi1224 closed 5 years ago

hanabi1224 commented 5 years ago

It may take 30min for the first time to install cargo-update and cargo-travis but will take <2 min afterwards, while now it takes >10min to run every build with tarpaulin

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-19.3%) to 80.688% when pulling 38bce19eeef305b4a096a98ecd55dde6fc598d72 on hanabi1224:travis_cache_tarpaulin into 51cb89294924939b864bf24b471081cc99caa61d on mozillazg:develop.

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-19.07%) to 80.928% when pulling ef3741eedcfbb41162455bdb92ac3a3a29ac8d8b on hanabi1224:travis_cache_tarpaulin into 51cb89294924939b864bf24b471081cc99caa61d on mozillazg:develop.

hanabi1224 commented 5 years ago

@mozillazg 原来这个100%cc是不是假的。。。

mozillazg commented 5 years ago

@hanabi1224 计算方法不一样(之前排除了 tests/ 和 src/bin/)。看了一下 tarpaulin 计算的覆盖率似乎是有点问题( https://github.com/mozillazg/rust-pinyin/pull/31 的测试覆盖率明显不是 100% 却报告是 100%)。 😂

BTW, cargo-travis 会经常装不上(主要是 cargo-update 更新太频繁,经常会安装失败): https://github.com/mozillazg/rust-pinyin/issues/21

hanabi1224 commented 5 years ago

@mozillazg 看起来cargo-update上次更新已经是大半年之前了,另外也可以把 cargo-update那两行注释掉,这样cargo-travis就一直是cache里的固定版本了,有需要的时候手动更新一下?

mozillazg commented 5 years ago

@hanabi1224 cache 什么时候失效是不可预知的,倒是没必要依赖 cache 。如果现在用 cargo-update + cargo-travis 稳定的话切回使用 cargo-travis 没问题的,就算偶尔失败也还好,主要是比 tarpaulin 的覆盖率计算错误要更容易接受。

BTW,可以考虑在 cargo-travis 中排除一下 tests/*src/bin/*

hanabi1224 commented 5 years ago

@mozillazg 加上了,另外这次有cache就非常快了

hanabi1224 commented 5 years ago

@mozillazg 另外travis的cache失效时间是28天 https://docs.travis-ci.com/user/caching#caches-expiration