From b7ef4ae161c3d5836697de888995eb45bd80663a Mon Sep 17 00:00:00 2001 From: Pascal Sachs Date: Fri, 19 Apr 2024 16:34:14 +0200 Subject: [PATCH] Migrate to github workflow Migrate tests from circle ci to github workflow. Remove circle ci mention in Readme --- .circleci/config.yml | 14 -------------- .github/workflows/check-and-build.yml | 25 +++++++++++++++++++++++++ README.md | 2 -- 3 files changed, 25 insertions(+), 16 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/check-and-build.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 51759a3..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,14 +0,0 @@ -version: 2 - -jobs: - build: - docker: - - image: rust:1.63 - steps: - - checkout - - run: rustup component add rustfmt - - run: rustup component add clippy - - run: cargo fmt -- --check - - run: cargo build - - run: cargo test - - run: cargo clippy -- -D warnings diff --git a/.github/workflows/check-and-build.yml b/.github/workflows/check-and-build.yml new file mode 100644 index 0000000..bd16521 --- /dev/null +++ b/.github/workflows/check-and-build.yml @@ -0,0 +1,25 @@ +name: Check and build rust library + +on: + pull_request: + branches: + - master + push: + branches: + - master + +jobs: + check-and-build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Stable with rustfmt and clippy + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: 1.63 + components: rustfmt, clippy + - run: cargo fmt -- --check + - run: cargo build + - run: cargo test + - run: cargo clippy -- -D warnings diff --git a/README.md b/README.md index 7f2fcbe..16501d9 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ # sensirion-i2c-rs -[![CircleCI][circleci-badge]][circleci] [![Crates.io Version][crates-io-badge]][crates-io] [![Crates.io Downloads][crates-io-download-badge]][crates-io-download] ![No Std][no-std-badge] @@ -7,7 +6,6 @@ Rust library with common functionality for I2C based sensors from Sensirion. -[circleci]: https://circleci.com/gh/Sensirion/sensirion-i2c-rs [circleci-badge]: https://circleci.com/gh/Sensirion/sensirion-i2c-rs.svg?style=shield [crates-io]: https://crates.io/crates/sensirion-i2c [crates-io-badge]: https://img.shields.io/crates/v/sensirion-i2c.svg?maxAge=3600