diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..9d75098c --- /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@v5 + - 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@v5 + - 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.