Skip to content

Commit

Permalink
Better CI and coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
bertof committed Dec 10, 2021
2 parents 87ae659 + ee007ef commit 09e09f7
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 6 deletions.
25 changes: 22 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,38 @@ stages:
- test

check:
stage: check
script:
- cargo check --all --tests --all-features
- rustup component add clippy
- cargo clippy --all --tests --all-features
cache:
paths:
- target/
- ~/.cargo/git
- ~/.cargo/registry
only:
- tags
- master

test:
stage: test
script:
- cargo test --all --all-features
- cargo install cargo-tarpaulin
- cargo tarpaulin --all --all-features
cache:
paths:
- target/
- ~/.cargo/git
- ~/.cargo/registry
coverage: '/^\d+.\d+% coverage/'
artifacts:
reports:
cobertura:
- cobertura.xml
only:
- tags
- master

cache:
paths:
- target/debug
- target/debug
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sbf"
version = "0.1.5"
version = "0.1.6"
authors = ["Filippo Berto <[email protected]>"]
edition = "2021"
homepage = "https://github.com/bertof/sbf-rs"
Expand Down
4 changes: 2 additions & 2 deletions src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::types::HashFunction;

#[test]
fn test_sbf() -> Result<(), Box<dyn Error>> {
let mut sbf = SBF::new(10 as u8, 2, 5,
let mut sbf = SBF::new(10u8, 2, 5,
HashFunction::MD5, 3)?;
#[cfg(feature = "serde_support")] {
println!("{}", serde_json::to_string(&sbf)?);
Expand Down Expand Up @@ -59,4 +59,4 @@ fn test_sbf() -> Result<(), Box<dyn Error>> {
}

Ok(())
}
}

0 comments on commit 09e09f7

Please sign in to comment.