Skip to content

Commit 9e96a9e

Browse files
committed
Add github actions to check formatting and clippy lints
Signed-off-by: Daniel Egger <[email protected]>
1 parent 52be08d commit 9e96a9e

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

.github/workflows/clippy.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
on: [push, pull_request]
2+
3+
name: Clippy check
4+
jobs:
5+
clippy_check:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v1
9+
- run: rustup component add clippy
10+
- uses: actions-rs/toolchain@v1
11+
with:
12+
toolchain: stable
13+
target: thumbv6m-none-eabi
14+
override: true
15+
- uses: actions-rs/clippy-check@v1
16+
with:
17+
token: ${{ secrets.GITHUB_TOKEN }}
18+
args: --features=stm32f072 --target thumbv6m-none-eabi

.github/workflows/rustfmt.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
on: [push, pull_request]
2+
3+
name: Code formatting check
4+
5+
jobs:
6+
fmt:
7+
name: Rustfmt
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: actions-rs/toolchain@v1
12+
with:
13+
profile: minimal
14+
toolchain: stable
15+
override: true
16+
- run: rustup component add rustfmt
17+
- uses: actions-rs/cargo@v1
18+
with:
19+
command: fmt
20+
args: --all -- --check

0 commit comments

Comments
 (0)