From d5925113df79555740de5610019248b221190905 Mon Sep 17 00:00:00 2001 From: Paulus Lucas Date: Thu, 28 Aug 2025 20:49:14 +0000 Subject: [PATCH 1/4] ci: prepare for first setup --- .github/workflows/ci.yml | 28 ++++++++++++++++++++++++++++ README.md | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0405f32 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,28 @@ +name: Rust CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Rust + uses: actions/setup-rust@v1 + with: + rust-version: stable + + - name: Build all crates + run: cargo build --workspace --all-targets --verbose + + - name: Run tests + run: cargo test --workspace --all-features --verbose + + \ No newline at end of file diff --git a/README.md b/README.md index a403a17..87df5ce 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Rust7 - Native Rust S7Client +[![Rust CI](https://github.com/davenardella/Rust7/actions/workflows/ci.yml/badge.svg)](https://github.com/davenardella/Rust7/actions/workflows/ci.yml) + Pragmatic native Rust S7 client (Snap7‑style) for Siemens PLCs. --- From 2bf9922a5e56ba167c43bb1513d7fb6edff83c6d Mon Sep 17 00:00:00 2001 From: Paulus Lucas Date: Thu, 28 Aug 2025 20:49:14 +0000 Subject: [PATCH 2/4] ci: prepare for first setup --- .github/workflows/ci.yml | 28 ++++++++++++++++++++++++++++ README.md | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0405f32 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,28 @@ +name: Rust CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Rust + uses: actions/setup-rust@v1 + with: + rust-version: stable + + - name: Build all crates + run: cargo build --workspace --all-targets --verbose + + - name: Run tests + run: cargo test --workspace --all-features --verbose + + \ No newline at end of file diff --git a/README.md b/README.md index a403a17..87df5ce 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Rust7 - Native Rust S7Client +[![Rust CI](https://github.com/davenardella/Rust7/actions/workflows/ci.yml/badge.svg)](https://github.com/davenardella/Rust7/actions/workflows/ci.yml) + Pragmatic native Rust S7 client (Snap7‑style) for Siemens PLCs. --- From c4c2d631eba34decbccee78b7426043b9f3715b2 Mon Sep 17 00:00:00 2001 From: Paulus Lucas Date: Thu, 28 Aug 2025 21:00:44 +0000 Subject: [PATCH 3/4] ci: improve CI workflow --- .github/workflows/ci.yml | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0405f32..21c01f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,20 +9,28 @@ on: jobs: build: runs-on: ubuntu-latest + name: cargo build + steps: + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + - run: cargo build --all-features + test: + name: cargo test + runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@v4 + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + - run: cargo test --all-features - - name: Set up Rust - uses: actions/setup-rust@v1 + # Check formatting with rustfmt + formatting: + name: cargo fmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 with: - rust-version: stable - - - name: Build all crates - run: cargo build --workspace --all-targets --verbose - - - name: Run tests - run: cargo test --workspace --all-features --verbose - - \ No newline at end of file + components: rustfmt + - name: Rustfmt Check + uses: actions-rust-lang/rustfmt@v1 \ No newline at end of file From 2ab4541a22d5c8af0d9236177430c4fd1f058a56 Mon Sep 17 00:00:00 2001 From: Paulus Lucas Date: Thu, 28 Aug 2025 21:16:27 +0000 Subject: [PATCH 4/4] doc: some crates badging --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 87df5ce..6e81ffc 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Rust7 - Native Rust S7Client -[![Rust CI](https://github.com/davenardella/Rust7/actions/workflows/ci.yml/badge.svg)](https://github.com/davenardella/Rust7/actions/workflows/ci.yml) +[![Rust CI Badge](https://github.com/davenardella/Rust7/actions/workflows/ci.yml/badge.svg)](https://github.com/davenardella/Rust7/actions/workflows/ci.yml) [![crates.io](https://img.shields.io/crates/v/rust7.svg)](https://crates.io/crates/rust7) ![crates.io total downloads](https://img.shields.io/crates/d/rust7) Pragmatic native Rust S7 client (Snap7‑style) for Siemens PLCs.