Skip to content

implement nRF24L01 driver #18

implement nRF24L01 driver

implement nRF24L01 driver #18

Workflow file for this run

name: tests
on:
push:
branches: [main]
paths:
- 'lib/**'
- '!lib/README.md'
- Cargo.toml
- .github/workflows/tests.yml
pull_request:
branches: [main]
paths:
- 'lib/**'
- '!lib/README.md'
- Cargo.toml
- .github/workflows/tests.yml
jobs:
lint-rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Install cargo-binstall
uses: cargo-bins/cargo-binstall@main
- name: Install Just
run: cargo binstall -y just
- name: Cache deps
uses: actions/cache@v4
with:
path: ~/.cargo
key: cargo-lib-${{ hashFiles('lib/src/**', 'lib/Cargo.toml') }}
- run: just lint
lint-python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
cache: 'pip'
cache-dependency-path: 'examples/python/requirements*.txt'
- name: Install workflow tools
run: >-
python -m pip install
-r examples/python/requirements.txt
-r examples/python/requirements-dev.txt
- run: ruff check
- run: ruff format
- run: mypy
test:
needs: [lint-rust]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Install cargo-binstall
uses: cargo-bins/cargo-binstall@main
- name: Install Just
run: cargo binstall -y just cargo-nextest cargo-llvm-cov
- name: Cache deps
uses: actions/cache@v4
with:
path: ~/.cargo
key: cargo-lib-${{ hashFiles('lib/src/**', 'lib/Cargo.toml') }}
- run: rustup component add llvm-tools-preview
# this enables a tool (for default toolchain) needed to measure code coverage.
- name: Run tests and generate reports
run: just test ci lcov
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
fail_ci_if_error: true