Skip to content

Version 0.3

Version 0.3 #12

Workflow file for this run

name: Rust CI/CD
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Cache Cargo
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: x86_64-unknown-linux-gnu
profile: minimal
override: true
- 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: Run cargo-tarpaulin
uses: actions-rs/tarpaulin@v0.1
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Archive code coverage results
uses: actions/upload-artifact@v1
with:
name: code-coverage-report
path: cobertura.xml
- name: Build Project
run: cargo build --release
- name: Upload Build Artifacts
if: always()
uses: actions/upload-artifact@v3
with:
name: hrv-rs-build
path: target/release/