Skip to content

Commit

Permalink
Merge pull request #4 from 9names/enable_ci
Browse files Browse the repository at this point in the history
Add CI
  • Loading branch information
9names authored Apr 8, 2024
2 parents 53dfad6 + ab8e566 commit 9666efa
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 9 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
on: [push, pull_request]
name: Cargo Build & Test
jobs:
build_and_test:
name: Build and test
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
steps:
- uses: actions/checkout@v3
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- run: cargo build --verbose
- run: cargo test --verbose
15 changes: 15 additions & 0 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
on: [push, pull_request]
name: Clippy check
jobs:
clippy_check:
name: Run Clippy
runs-on: ubuntu-20.04
env:
RUSTFLAGS: "-D warnings"
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
target: thumbv6m-none-eabi
components: clippy
- run: cargo clippy
15 changes: 15 additions & 0 deletions .github/workflows/rustfmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
on: [push, pull_request]
name: Code formatting check
jobs:
fmt:
name: Rustfmt
runs-on: ubuntu-20.04
env:
RUSTFLAGS: "-D warnings"
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
target: thumbv6m-none-eabi
components: rustfmt
- run: cargo fmt -- --check
2 changes: 1 addition & 1 deletion tests/classic_hd.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use embedded_hal_mock::delay::MockNoop;
use embedded_hal_mock::i2c::{self, Transaction};
use paste::paste;
use wii_ext::classic::*;
use wii_ext::classic_sync::*;
use wii_ext::*;

/// There's a certain amount of slop around the center position.
Expand Down
5 changes: 3 additions & 2 deletions tests/classic_pdp_clone.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
use embedded_hal_mock::delay::MockNoop;
use embedded_hal_mock::i2c::{self, Transaction};
use paste::paste;
use wii_ext::classic::*;
use wii_ext::classic_core::*;
use wii_ext::classic_sync::*;
use wii_ext::common::*;
use wii_ext::core::classic::ClassicReading;
use wii_ext::test_data::*;
use wii_ext::*;

Expand Down
2 changes: 1 addition & 1 deletion tests/classic_pdp_clone_hd.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use embedded_hal_mock::delay::MockNoop;
use embedded_hal_mock::i2c::{self, Transaction};
use paste::paste;
use wii_ext::classic::*;
use wii_ext::classic_sync::*;
use wii_ext::*;

/// There's a certain amount of slop around the center position.
Expand Down
5 changes: 3 additions & 2 deletions tests/classic_pro.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
use embedded_hal_mock::delay::MockNoop;
use embedded_hal_mock::i2c::{self, Transaction};
use paste::paste;
use wii_ext::classic::*;
use wii_ext::classic_core::*;
use wii_ext::classic_sync::*;
use wii_ext::common::*;
use wii_ext::core::classic::ClassicReading;
use wii_ext::test_data::*;
use wii_ext::*;

Expand Down
2 changes: 1 addition & 1 deletion tests/classic_pro_hd.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use embedded_hal_mock::delay::MockNoop;
use embedded_hal_mock::i2c::{self, Transaction};
use paste::paste;
use wii_ext::classic::*;
use wii_ext::classic_sync::*;
use wii_ext::*;

/// There's a certain amount of slop around the center position.
Expand Down
5 changes: 3 additions & 2 deletions tests/classic_regular.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
use embedded_hal_mock::delay::MockNoop;
use embedded_hal_mock::i2c::{self, Transaction};
use paste::paste;
use wii_ext::classic::*;
use wii_ext::classic_core::*;
use wii_ext::classic_sync::*;
use wii_ext::common::*;
use wii_ext::core::classic::ClassicReading;
use wii_ext::test_data::*;
use wii_ext::*;

Expand Down

0 comments on commit 9666efa

Please sign in to comment.