Skip to content

Commit

Permalink
Retransmission and rework crate (#6)
Browse files Browse the repository at this point in the history
* Work to combine network and handler

Moving to a combined network and handler because it is required for retransmit

* Should not work but local cargo does not detect?

* Very large rework to make retransmission possible

Add retranmission and tests

* Small lib change

* Adjusted documentation

* Adjusted documentation

* Bumped version number to 1.5

* Bumped tokio version due to tokio issue readhalf unsplit

* Handle connack packet directly

* Cargo clippy and fmt

* Fix issue in state with connack

Vec would be cleared but would depend on items beting Some or None instead.

* Cargo fmt and clippy

* Adjusted code coverage generation

* Make tests and code coverage sequential
  • Loading branch information
GunnarMorrigan authored Mar 2, 2023
1 parent e12b995 commit 4f0f501
Show file tree
Hide file tree
Showing 43 changed files with 2,171 additions and 2,850 deletions.
41 changes: 28 additions & 13 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
# run clippy to verify we have no warnings
- run: cargo fetch
- name: cargo clippy
run: cargo clippy --all-targets --all-features -- -D warnings
run: cargo clippy --all-targets -- -D warnings

test:
name: Test
Expand All @@ -47,20 +47,35 @@ jobs:
- uses: actions/checkout@v3
- uses: EmbarkStudios/cargo-deny-action@v1

codecov:
name: Generate code coverage
coverage:
name: Coverage
runs-on: ubuntu-latest
needs: test
permissions:
issues: write

steps:
- uses: actions/checkout@v2
- uses: hecrj/setup-rust-action@v1
# TODO: we don't use caching here because it's unclear if it will cause
# the coverage to get less accurate (this is the case for some coverage
# tools, although possibly not tarpaulin?)
- name: Run cargo-tarpaulin
uses: actions-rs/tarpaulin@v0.1
- name: Checkout
uses: actions/checkout@v3
with:
args: '--all-features'
persist-credentials: false

- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly

- name: Upload to codecov.io
uses: codecov/codecov-action@v1
- name: Install cargo-llvm-cov
run: |
curl -LsSf https://github.com/taiki-e/cargo-llvm-cov/releases/latest/download/cargo-llvm-cov-x86_64-unknown-linux-gnu.tar.gz \
| tar xzf - -C ~/.cargo/bin
- name: Generate coverage report
run: |
cargo llvm-cov clean --workspace
cargo llvm-cov test -p mqrstt --no-report --all-features -- --test-threads=1
cargo llvm-cov report --lcov > lcov.txt
env:
RUSTFLAGS: --cfg __ui_tests

- name: Upload coverage report
uses: codecov/codecov-action@v3
with:
files: ./lcov.txt
Loading

0 comments on commit 4f0f501

Please sign in to comment.