Skip to content

Commit

Permalink
test codecov workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tomtuamnuq committed Mar 27, 2024
1 parent 33cf518 commit 647250b
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 5 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: coverage

on:
push:
branches: ["main"]
jobs:
test:
name: coverage
runs-on: ubuntu-latest
container:
image: xd009642/tarpaulin:latest
options: --security-opt seccomp=unconfined
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Generate code coverage
run: |
cargo tarpaulin --verbose --all-features --exclude-files "examples/*.rs" "benches/*.rs" --timeout 120 --out xml
- name: Upload to codecov.io
uses: codecov/codecov-action@v2
with:
verbose: true
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ Cargo.lock
*.pdb

# project-based Visual Studio Code settings
.vscode
.vscode
# codecode output
cobertura.xml
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
authors = ["Tom Krüger"]
description = "Perplex numbers based on num-traits"
documentation = "https://github.com/tomtuamnuq/perplex_num"
description = "Perplex (hyperbolic or split-complex) numbers based on num-traits"
documentation = "https://docs.rs/perplex_num"
homepage = "https://github.com/tomtuamnuq/perplex_num"
keywords = ["mathematics", "numerics", "hyperbolic"]
categories = ["algorithms", "science"]
keywords = ["perplex-numbers", "hyperbolic-geometry", "algebra", "split-complex", "mathematics", "numerics", "scientific-computing"]
categories = ["algorithms", "science::mathematics", "simulation"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/tomtuamnuq/perplex_num"
name = "perplex_num"
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@ fn main() {
}
```

## Coverage

Test coverage report is generated with [cargo tarpaulin](https://github.com/xd009642/tarpaulin) invoke it with:
```sh
cargo tarpaulin --verbose --all-targets --skip-clean --exclude-files "examples/*.rs" "benches/*.rs"
```


## Compatibility
The `perplex_num` crate is tested for rustc 1.76.

Expand Down

0 comments on commit 647250b

Please sign in to comment.