-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* remove/justify unwraps * justify unwraps. * add record and vault exists. * update documentation for vault and store. * update snapshot docs. * update runtime docs. * add docs and add .changes. * fix(covector): JSON Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * feat(tests): add coverage Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * fix(week-of-rust): meta cleanups Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(deps): bump iota-crypto Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * update cli to use generic locations. * update example. * fix(crypto): use working revs see #172 Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(readme): update banner and testing cmd Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(readme): updates Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(publish): prep Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> Co-authored-by: Daniel Thompson-Yvetot <denjell@mailscript.com>
- Loading branch information
1 parent
4b522e3
commit dae0457
Showing
42 changed files
with
356 additions
and
228 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
"vault": patch | ||
"snapshot": patch | ||
"store": patch | ||
"runtime": patch | ||
"iota-stronghold": patch | ||
--- | ||
|
||
Add documentation and cleanup the code for these crates and modules in preparation for beta. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Coverage | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
- main | ||
paths: | ||
- '**.rs' | ||
- '**.toml' | ||
- '.github/workflows/coverage.yml' | ||
- '.github/workflows/scripts/coverage.sh' | ||
|
||
jobs: | ||
coverage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
override: true | ||
components: llvm-tools-preview | ||
- uses: actions-rs/install@v0.1 | ||
with: | ||
crate: cargo-binutils | ||
version: 0.3.3 | ||
- uses: actions-rs/install@v0.1 | ||
with: | ||
crate: rustfilt | ||
version: 0.2.1 | ||
- name: Run test coverage | ||
run: bash .github/workflows/scripts/coverage.sh | ||
- uses: coverallsapp/github-action@v1.1.2 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
path-to-lcov: coverage/coverage.info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Remove stale coverage report | ||
rm -r coverage | ||
mkdir coverage | ||
|
||
# Run tests with profiling instrumentation | ||
echo "Running instrumented unit tests..." | ||
RUSTFLAGS="-Zinstrument-coverage" LLVM_PROFILE_FILE="stronghold-rs-%m.profraw" cargo +nightly test --tests --all --all-features | ||
|
||
# Merge all .profraw files into "stronghold-rs.profdata" | ||
echo "Merging coverage data..." | ||
cargo +nightly profdata -- merge stronghold-rs-*.profraw -o stronghold-rs.profdata | ||
|
||
# List the test binaries | ||
echo "Locating test binaries..." | ||
BINARIES="" | ||
|
||
for file in \ | ||
$( \ | ||
RUSTFLAGS="-Zinstrument-coverage" \ | ||
cargo +nightly test --tests --all --all-features --no-run --message-format=json \ | ||
| jq -r "select(.profile.test == true) | .filenames[]" \ | ||
| grep -v dSYM - \ | ||
); \ | ||
do | ||
echo "Found $file" | ||
BINARIES="${BINARIES} -object $file" | ||
done | ||
|
||
# Generate and export the coverage report to lcov format | ||
echo "Generating lcov file..." | ||
cargo +nightly cov -- export ${BINARIES} \ | ||
--instr-profile=stronghold-rs.profdata \ | ||
--ignore-filename-regex="/.cargo|rustc|target|tests|/.rustup" \ | ||
--format=lcov --Xdemangler=rustfilt \ | ||
>> coverage/coverage.info | ||
|
||
# Ensure intermediate coverage files are deleted | ||
echo "Removing intermediate files..." | ||
find . -name "*.profraw" -type f -delete | ||
find . -name "*.profdata" -type f -delete |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.