Add tests to our CI
Also found some doctests that were failing
This commit is contained in:
parent
ed83b93b6d
commit
e13aa4c2a0
10
.github/workflows/rust.yml
vendored
10
.github/workflows/rust.yml
vendored
@ -122,6 +122,16 @@ jobs:
|
|||||||
- name: Check fmt
|
- name: Check fmt
|
||||||
run: for i in embassy-*; do (cd $i; cargo fmt -- --check); done
|
run: for i in embassy-*; do (cd $i; cargo fmt -- --check); done
|
||||||
|
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
- name: Test
|
||||||
|
run: cd embassy && cargo test
|
||||||
|
|
||||||
metapac_gen:
|
metapac_gen:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
@ -67,7 +67,6 @@ impl Timer {
|
|||||||
/// # #![feature(type_alias_impl_trait)]
|
/// # #![feature(type_alias_impl_trait)]
|
||||||
/// #
|
/// #
|
||||||
/// # fn foo() {}
|
/// # fn foo() {}
|
||||||
/// use embassy::executor::task;
|
|
||||||
/// use embassy::time::{Duration, Timer};
|
/// use embassy::time::{Duration, Timer};
|
||||||
///
|
///
|
||||||
/// #[embassy::task]
|
/// #[embassy::task]
|
||||||
@ -110,7 +109,6 @@ impl Future for Timer {
|
|||||||
/// # #![feature(impl_trait_in_bindings)]
|
/// # #![feature(impl_trait_in_bindings)]
|
||||||
/// # #![feature(type_alias_impl_trait)]
|
/// # #![feature(type_alias_impl_trait)]
|
||||||
/// #
|
/// #
|
||||||
/// use embassy::executor::task;
|
|
||||||
/// use embassy::time::{Duration, Timer};
|
/// use embassy::time::{Duration, Timer};
|
||||||
/// # fn foo() {}
|
/// # fn foo() {}
|
||||||
///
|
///
|
||||||
@ -134,7 +132,6 @@ impl Future for Timer {
|
|||||||
/// # #![feature(impl_trait_in_bindings)]
|
/// # #![feature(impl_trait_in_bindings)]
|
||||||
/// # #![feature(type_alias_impl_trait)]
|
/// # #![feature(type_alias_impl_trait)]
|
||||||
/// #
|
/// #
|
||||||
/// use embassy::executor::task;
|
|
||||||
/// use embassy::time::{Duration, Ticker};
|
/// use embassy::time::{Duration, Ticker};
|
||||||
/// use futures::StreamExt;
|
/// use futures::StreamExt;
|
||||||
/// # fn foo(){}
|
/// # fn foo(){}
|
||||||
|
@ -17,7 +17,7 @@ use crate::io::{AsyncBufRead, AsyncWrite, Error, Result};
|
|||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
/// ```
|
/// ``` ignore
|
||||||
/// # futures::executor::block_on(async {
|
/// # futures::executor::block_on(async {
|
||||||
/// use futures::io::{self, AsyncWriteExt, Cursor};
|
/// use futures::io::{self, AsyncWriteExt, Cursor};
|
||||||
///
|
///
|
||||||
|
@ -119,7 +119,6 @@ unsafe impl cortex_m::interrupt::Nr for NrWrap {
|
|||||||
/// ``` no_compile
|
/// ``` no_compile
|
||||||
/// use embassy::traits::*;
|
/// use embassy::traits::*;
|
||||||
/// use embassy::util::InterruptFuture;
|
/// use embassy::util::InterruptFuture;
|
||||||
/// use embassy::executor::task;
|
|
||||||
/// use embassy_stm32::interrupt; // Adjust this to your MCU's embassy HAL.
|
/// use embassy_stm32::interrupt; // Adjust this to your MCU's embassy HAL.
|
||||||
/// #[embassy::task]
|
/// #[embassy::task]
|
||||||
/// async fn demo_interrupt_future() {
|
/// async fn demo_interrupt_future() {
|
||||||
|
Loading…
Reference in New Issue
Block a user