Skip to content

Merge remote-tracking branch 'origin/main' #53

Merge remote-tracking branch 'origin/main'

Merge remote-tracking branch 'origin/main' #53

Workflow file for this run

# Based on https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md
name: Rust CI/CD
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Install Dependencies
run: sudo apt install libdbus-1-dev pkg-config
- name: Checkout sources
uses: actions/checkout@v4
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
- name: setup cache
uses: Swatinem/rust-cache@v2
- name: Run cargo check
run: cargo check --all-targets --all-features
lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Install Dependencies
run: sudo apt install libdbus-1-dev pkg-config
- name: Checkout sources
uses: actions/checkout@v2
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: setup cache
uses: Swatinem/rust-cache@v2
- name: Run cargo fmt
run: cargo fmt --all -- --check
- name: Run cargo clippy
run: cargo clippy --all-features -- -D warnings
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Install Dependencies
run: sudo apt install libdbus-1-dev pkg-config
- name: Checkout sources
uses: actions/checkout@v4
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
- name: setup cache
uses: Swatinem/rust-cache@v2
- name: Run cargo test
run: cargo test --all-features -- --test-threads=1
coverage:
name: coverage tests
runs-on: ubuntu-latest
steps:
- name: Install Dependencies
run: sudo apt install libdbus-1-dev pkg-config
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 30
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: setup cache
uses: Swatinem/rust-cache@v2
- name: Install cargo-tarpaulin
run: cargo install cargo-tarpaulin
- name: Run cargo tarpaulin
run: cargo tarpaulin --out Xml --all-features -- --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@v4
with:
name: code-coverage-report
path: cobertura.xml