Skip to content

Commit

Permalink
Merge pull request #1 from mat-kie/version-0.3-dev
Browse files Browse the repository at this point in the history
Version 0.3
  • Loading branch information
mat-kie authored Dec 5, 2024
2 parents 5729940 + 9aa02bc commit 4fd6f37
Show file tree
Hide file tree
Showing 19 changed files with 1,584 additions and 1,182 deletions.
147 changes: 95 additions & 52 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Based on https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md
name: Rust CI/CD

on:
Expand All @@ -9,67 +10,109 @@ on:
- main

jobs:
build:
name: Build and Test
check:
name: Check
runs-on: ubuntu-latest

steps:
- name: Checkout Code
- name: Checkout sources
uses: actions/checkout@v4

- name: Cache Cargo
uses: actions/cache@v3
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: Install Dependencies
run: sudo apt install libdbus-1-dev pkg-config

- name: Run cargo check
uses: actions-rs/cargo@v1
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Set up Rust
command: check

test:
name: Test Suite
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: x86_64-unknown-linux-gnu
override: true
- name: Install Dependencies
run: sudo apt install libdbus-1-dev pkg-config
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test

lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy

- name: Install Dependencies
run: sudo apt install libdbus-1-dev pkg-config && rustup component add clippy rustfmt

- name: Install cargo-tarpaulin
run: cargo install cargo-tarpaulin

- name: Run Clippy (Linting)
run: cargo clippy --all-targets --all-features -- -D warnings

- name: Run Tests
run: cargo test --all-targets --all-features --verbose

- name: Build Project
run: cargo build --release

# - name: Upload Build Artifacts
# if: never()
# uses: actions/upload-artifact@v3
# with:
# name: hrv-rs-build
# path: target/release/
- name: Run Coverage Analysis
run: cargo tarpaulin --out Xml --all-targets --all-features
env:
RUSTFLAGS: "-C link-dead-code"
#
# - name: Upload coverage reports to Codecov
# uses: codecov/codecov-action@v5
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
#
# - name: Upload to Codecov
# uses: codecov/codecov-action@v3
# with:
# files: tarpaulin-report.xml
# fail_ci_if_error: true
# flags: unittests
run: sudo apt install libdbus-1-dev pkg-config

- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings

coverage:
name: coverage tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 30

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Install Dependencies
run: sudo apt install libdbus-1-dev pkg-config

- name: Run cargo-tarpaulin
uses: actions-rs/tarpaulin@v0.1
with:
version: '0.15.0'
args: '-- --test-threads 1'

- name: Upload to codecov.io
uses: codecov/codecov-action@v5
with:
token: ${{secrets.CODECOV_TOKEN}}

- name: Archive code coverage results
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
path: cobertura.xml
14 changes: 10 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,29 +1,35 @@
[package]
name = "hrv-rs"
version = "0.2.0"
version = "0.3.0"
edition = "2021"

[features]
mock=[]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
egui = "0.29.1"
egui_extras = "0.29.1"
egui_plot = "0.29.0"
eframe = { version = "0.29.1", features = ["default"] }
image = { version = "0.25.1", default-features = false, features = ["png"] }
image = { version = "0.25.5", default-features = false, features = ["png"] }
rfd = "0.15.1"
env_logger = { version = "0.11.5", default-features = false, features = [
"auto-color",
"humantime",
] }
btleplug = "0.11.6"
uuid = {version = "1.11.0", features = ["v4"]}
tokio = { version = "1.41.1", features = ['full'] }
tokio = { version = "1.42.0", features = ['full'] }
futures = "0.3.31"
nalgebra = "0.33.2"
time = { version = "0.3.36", features = ["macros", "serde", "serde-human-readable", "serde-well-known"] }
time = { version = "0.3.37", features = ["macros", "serde", "serde-human-readable", "serde-well-known"] }
log = { version = "0.4.22", features = [] }
serde = { version = "1.0.215", features = ["derive", "serde_derive"] }
serde_json = "1.0.133"
async-trait = "0.1.83"
mockall = "0.13.1"
rand = "0.8.5"
typetag = "0.2.18"
anyhow = { version = "1.0.94", features = ["backtrace"] }
Loading

0 comments on commit 4fd6f37

Please sign in to comment.