-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add coverage for bitarray and small README
- Loading branch information
Showing
4 changed files
with
62 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -19,6 +19,33 @@ jobs: | |
toolchain: nightly | ||
override: true | ||
|
||
|
||
|
||
- name: Run cargo test (bitarray) | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --all-features --no-fail-fast -p bitarray | ||
env: | ||
CARGO_INCREMENTAL: 0 | ||
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | ||
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | ||
|
||
- name: Gather coverage information (bitarray) | ||
id: coverage-bitarray | ||
uses: actions-rs/[email protected] | ||
|
||
- name: Upload coverage reports to Codecov (bitarray) | ||
uses: codecov/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
file: ${{ steps.coverage-bitarray.outputs.report }} | ||
flags: bitarray | ||
verbose: true | ||
fail_ci_if_error: true | ||
|
||
|
||
|
||
- name: Run cargo test (fa-compression) | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
|
@@ -42,6 +69,8 @@ jobs: | |
verbose: true | ||
fail_ci_if_error: true | ||
|
||
|
||
|
||
- name: Run cargo test (sa-mappings) | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
|
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,21 @@ | ||
# Bitarray | ||
|
||
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/unipept/unipept-index/test.yml?logo=github) | ||
![Codecov](https://img.shields.io/codecov/c/github/unipept/unipept-index?token=IZ75A2FY98&flag=bitarray&logo=codecov) | ||
![Static Badge](https://img.shields.io/badge/doc-rustdoc-blue) | ||
|
||
The `bitarray` offers a special array where each item is represented by a specified amount of bits (smaller than 64). The bitarray uses a pre-alocated vector and allows you to `set` or `get` a value from the array. | ||
|
||
## Example | ||
|
||
```rust | ||
use bitarray; | ||
|
||
fn main() { | ||
let bitarray = BitArray::<40>::with_capacity(4); | ||
|
||
bitarray.set(0, 0b0001110011111010110001000111111100110010); | ||
|
||
assert_eq!(bitarray.get(0), 0b0001110011111010110001000111111100110010); | ||
} | ||
``` |
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