Added minimum rust version 1.75 and writing of connack packet #126
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
name: Rust | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: "clippy, rustfmt" | |
- uses: Swatinem/rust-cache@v2 | |
# make sure all code has been formatted with rustfmt and linted with clippy | |
# - name: rustfmt | |
# run: cargo fmt -- --check --color always | |
# run clippy to verify we have no warnings | |
- run: cargo fetch | |
- name: cargo clippy | |
run: cargo clippy --all-targets --all-features -- -D warnings | |
test: | |
name: Test | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- run: cargo fetch | |
- name: cargo test build | |
run: cargo build --tests --release | |
- name: cargo test | |
run: cargo test --release | |
deny-check: | |
name: cargo-deny | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: EmbarkStudios/cargo-deny-action@v1 | |
coverage: | |
name: Coverage | |
runs-on: ubuntu-latest | |
permissions: | |
issues: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: Install toolchain | |
uses: dtolnay/rust-toolchain@nightly | |
- 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 | |
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 |