Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix coverage #153

Merged
merged 6 commits into from Jul 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
54 changes: 25 additions & 29 deletions .circleci/config.yml
Expand Up @@ -31,8 +31,8 @@ jobs:
- checkout
- restore_cache:
keys:
- v1-many-rs-build-{{ arch }}-{{ checksum "Cargo.lock" }}
- v1-many-rs-build-{{ arch }}-
- many-rs-{{ .Environment.CACHE_VERSION }}-build-{{ arch }}-{{ checksum "Cargo.lock" }}
- many-rs-{{ .Environment.CACHE_VERSION }}-build-{{ arch }}-
- rust/install:
version: nightly
- rust/format:
Expand All @@ -51,15 +51,15 @@ jobs:
- checkout
- restore_cache:
keys:
- v1-many-rs-build-{{ arch }}-{{ checksum "Cargo.lock" }}
- v1-many-rs-build-{{ arch }}-
- many-rs-{{ .Environment.CACHE_VERSION }}-build-{{ arch }}-{{ checksum "Cargo.lock" }}
- many-rs-{{ .Environment.CACHE_VERSION }}-build-{{ arch }}-
- rust/install:
version: nightly
- rust/build:
crate: --all-features
with_cache: false
- save_cache:
key: v1-many-rs-build-{{ arch }}-{{ checksum "Cargo.lock" }}
key: many-rs-{{ .Environment.CACHE_VERSION }}-build-{{ arch }}-{{ checksum "Cargo.lock" }}
<<: *rust_cache_path
test-linux:
parameters:
Expand All @@ -73,20 +73,20 @@ jobs:
- checkout
- restore_cache:
keys:
- v1-many-rs-test-{{ arch }}-{{ checksum "Cargo.lock" }}
- v1-many-rs-test-{{ arch }}-
- v1-many-rs-build-{{ arch }}-{{ checksum "Cargo.lock" }}
- v1-many-rs-build-{{ arch }}-
- many-rs-{{ .Environment.CACHE_VERSION }}-test-{{ arch }}-{{ checksum "Cargo.lock" }}
- many-rs-{{ .Environment.CACHE_VERSION }}-test-{{ arch }}-
- many-rs-{{ .Environment.CACHE_VERSION }}-build-{{ arch }}-{{ checksum "Cargo.lock" }}
- many-rs-{{ .Environment.CACHE_VERSION }}-build-{{ arch }}-
- rust/install:
version: nightly
- rust/test:
package: --lib --all-targets --all-features
package: --all-targets --all-features
with_cache: false
- rust/test:
package: --all-features --doc
with_cache: false
- save_cache:
key: v1-many-rs-test-{{ arch }}-{{ checksum "Cargo.lock" }}
key: many-rs-{{ .Environment.CACHE_VERSION }}-test-{{ arch }}-{{ checksum "Cargo.lock" }}
<<: *rust_cache_path
test-macos:
parameters:
Expand All @@ -97,18 +97,18 @@ jobs:
- checkout
- restore_cache:
keys:
- v1-many-rs-test-{{ arch }}-{{ checksum "Cargo.lock" }}
- v1-many-rs-test-{{ arch }}-
- v1-many-rs-build-{{ arch }}-{{ checksum "Cargo.lock" }}
- v1-many-rs-build-{{ arch }}-
- many-rs-{{ .Environment.CACHE_VERSION }}-test-{{ arch }}-{{ checksum "Cargo.lock" }}
- many-rs-{{ .Environment.CACHE_VERSION }}-test-{{ arch }}-
- many-rs-{{ .Environment.CACHE_VERSION }}-build-{{ arch }}-{{ checksum "Cargo.lock" }}
- many-rs-{{ .Environment.CACHE_VERSION }}-build-{{ arch }}-
- rust/install:
version: nightly
# There are issues with HSM and macos testing (Segfault 11). Disable HSM testing on macos for now.
- rust/test:
package: --lib --all-targets --features default,client,raw,testing,trace_error_creation
package: --all-targets --features default,client,raw,testing,trace_error_creation
with_cache: false
- save_cache:
key: v1-many-rs-test-{{ arch }}-{{ checksum "Cargo.lock" }}
key: many-rs-{{ .Environment.CACHE_VERSION }}-test-{{ arch }}-{{ checksum "Cargo.lock" }}
<<: *rust_cache_path
coverage:
parameters:
Expand All @@ -122,12 +122,8 @@ jobs:
- checkout
- restore_cache:
keys:
- v1-many-rs-coverage-{{ arch }}-{{ checksum "Cargo.lock" }}
- v1-many-rs-coverage-{{ arch }}-
- v1-many-rs-test-{{ arch }}-{{ checksum "Cargo.lock" }}
- v1-many-rs-test-{{ arch }}-
- v1-many-rs-build-{{ arch }}-{{ checksum "Cargo.lock" }}
- v1-many-rs-build-{{ arch }}-
- many-rs-{{ .Environment.CACHE_VERSION }}-coverage-{{ arch }}-{{ checksum "Cargo.lock" }}
- many-rs-{{ .Environment.CACHE_VERSION }}-coverage-{{ arch }}-
- rust/install:
version: nightly
- run:
Expand All @@ -138,17 +134,17 @@ jobs:
command: cargo install grcov --root target/
- run:
name: generate test coverage
command: cargo test --lib --all-targets --all-features
command: cargo test --all-targets --all-features
environment:
RUSTFLAGS: "-C instrument-coverage"
LLVM_PROFILE_FILE: "coverage/lcov-%p-%m.profraw"
- run:
name: generate coverage report
command: target/bin/grcov coverage --binary-path target/debug/ -s . --keep-only 'src/**' --prefix-dir $PWD -t lcov --branch --ignore-not-existing -o coverage/report.lcov
command: target/bin/grcov src -b target/debug/ -s . --keep-only 'src/**' --prefix-dir $PWD -t lcov --branch --ignore-not-existing -o coverage/report.lcov
- codecov/upload:
file: coverage/report.lcov
- save_cache:
key: v1-many-rs-coverage-{{ arch }}-{{ checksum "Cargo.lock" }}
key: many-rs-{{ .Environment.CACHE_VERSION }}-coverage-{{ arch }}-{{ checksum "Cargo.lock" }}
<<: *rust_cache_path
create:
parameters:
Expand Down Expand Up @@ -205,16 +201,16 @@ jobs:
- checkout
- restore_cache:
keys:
- v1-ghjobs-audit-{{ arch }}-{{ checksum "Cargo.lock" }}
- v1-ghjobs-audit-{{ arch }}-
- many-rs-{{ .Environment.CACHE_VERSION }}-audit-{{ arch }}-{{ checksum "Cargo.lock" }}
- many-rs-{{ .Environment.CACHE_VERSION }}-audit-{{ arch }}-
- run:
name: install cargo-audit
command: cargo install cargo-audit
- run:
name: cargo audit
command: cargo audit
- save_cache:
key: v1-ghjobs-audit-{{ arch }}-{{ checksum "Cargo.lock" }}
key: many-rs-{{ .Environment.CACHE_VERSION }}-audit-{{ arch }}-{{ checksum "Cargo.lock" }}
<<: *rust_cache_path

# Re-usable commands
Expand Down
13 changes: 0 additions & 13 deletions .github/workflows/audit.yml

This file was deleted.

76 changes: 0 additions & 76 deletions .github/workflows/ci.yml

This file was deleted.

70 changes: 0 additions & 70 deletions .github/workflows/coverage.yml

This file was deleted.