From 0461c72e3b4550519fbd40624254d743c2e26647 Mon Sep 17 00:00:00 2001 From: Dan Date: Wed, 26 Mar 2025 11:37:47 +0000 Subject: [PATCH 1/3] Create GHA ci.yml --- .github/workflows/ci.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 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..3a99e17 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,28 @@ +name: ci + +on: + push: + branches: + - main + tags: + - '*' + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt, clippy + + # Lint code and run tests. + - run: | + cargo fmt -- --check + cargo clippy --tests -- --no-deps -D warnings + + # Run all tests. + - run: cargo test --no-fail-fast --all-features From 495c5cf5c16fa1519df579c8811d30ba3bf7b291 Mon Sep 17 00:00:00 2001 From: Dan Date: Wed, 26 Mar 2025 11:38:44 +0000 Subject: [PATCH 2/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2fbf357..ee2fdad 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # chargectl -[![builds.sr.ht status](https://builds.sr.ht/~loshz/chargectl.svg)](https://builds.sr.ht/~loshz/chargectl?) [![MIT licensed](https://img.shields.io/badge/license-MIT-blue)](LICENSE) +[![Build Status](https://github.com/loshz/chargectl/workflows/ci/badge.svg)](https://github.com/loshz/chargectl/actions) [![MIT licensed](https://img.shields.io/badge/license-MIT-blue)](LICENSE) CLI for managing charge thresholds on modern Linux machines. Inspired by [TLP](https://linrunner.de/tlp/). From c22e72147746d90630a72810e2aa37b9cc28e2cf Mon Sep 17 00:00:00 2001 From: Dan Date: Wed, 26 Mar 2025 11:39:23 +0000 Subject: [PATCH 3/3] Delete .build.yml --- .build.yml | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 .build.yml diff --git a/.build.yml b/.build.yml deleted file mode 100644 index da61ce0..0000000 --- a/.build.yml +++ /dev/null @@ -1,18 +0,0 @@ -image: alpine/edge -packages: -- rust -- rustfmt -- rust-clippy -- cargo -sources: -- https://git.sr.ht/~loshz/chargectl -environment: - repo: chargectl -tasks: -- lint: | - cd $repo - cargo fmt -- --check - cargo clippy --tests -- --no-deps -D warnings -- test: | - cd $repo - cargo test --no-fail-fast --all-features