From ea3f8f4d52cc686f44fb535f98c369045c069bfa Mon Sep 17 00:00:00 2001 From: Andrei Chernyshev Date: Tue, 22 Sep 2026 15:29:34 +0200 Subject: [PATCH 1/2] ci: run rspec and rubocop on every pull request The repo only had the manual release workflow, so the suite ran wherever someone remembered to run it. Ruby 3.4, matching connected_health and Global Admin. Co-Authored-By: Claude Fable 5.1 --- .github/workflows/ci.yml | 27 +++++++++++++++++++++++++++ README.md | 9 +++++++++ 2 files changed, 36 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 00000000..afca5673 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,27 @@ +name: CI + +on: + pull_request: + push: + branches: [master] + +jobs: + rubocop: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.4' + bundler-cache: true + - run: bundle exec rubocop lib spec + + rspec: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.4' + bundler-cache: true + - run: bundle exec rspec diff --git a/README.md b/README.md index 80d76d3f..2e906dcc 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,15 @@ Or install it yourself as: $ gem install kb +## Development + +Specs and RuboCop run on every pull request (`.github/workflows/ci.yml`) on Ruby 3.4. Locally: + +```sh +docker compose run --rm kb bundle exec rspec +docker compose run --rm kb bundle exec rubocop lib spec +``` + ## Usage This gem wraps the Knowledge Base Api and exposes CRUD-_able_ entities into the requiring application. From 1e2ff1077af17c7acd0d5b1dd5e0b9d1d5004b78 Mon Sep 17 00:00:00 2001 From: Andrei Chernyshev Date: Tue, 22 Sep 2026 15:32:39 +0200 Subject: [PATCH 2/2] ci: actions/checkout v5 (v4 targets deprecated Node 20) --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index afca5673..9d75098c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ jobs: rubocop: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: ruby/setup-ruby@v1 with: ruby-version: '3.4' @@ -19,7 +19,7 @@ jobs: rspec: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: ruby/setup-ruby@v1 with: ruby-version: '3.4'