Skip to content

Commit

Permalink
Add CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmoon committed Apr 20, 2024
1 parent fc46be6 commit 930f642
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Check Rust

on:
push:
branches: [main]
pull_request:
branches: [main]

env:
CARGO_TERM_COLOR: always

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install nightly
run: rustup toolchain add --component=rustfmt nightly
- name: Checks
run: ./ci.sh
18 changes: 18 additions & 0 deletions ci.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

set -euxo pipefail

export RUSTFLAGS=-Dwarnings

cargo +nightly fmt -- --check

cargo clippy
cargo clippy --features embassy-time

cargo clippy --features defmt
cargo clippy --features defmt,embassy-time

cargo clippy --features log
cargo clippy --features log,embassy-time

cargo test --features embassy-time

0 comments on commit 930f642

Please sign in to comment.