diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index b2db890..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,94 +0,0 @@ -version: 2.1 - -executors: - ruby: - parameters: - version: - description: "Ruby version number" - default: "3.3" - type: string - docker: - - image: ruby:<< parameters.version >> - environment: - MT_COMPAT: "1" # Allows old versions of mocha gem to work with minitest - -commands: - bundle_install: - description: Install Ruby dependencies with Bundler - parameters: - key: - description: "Cache key" - default: "3.3" - type: string - steps: - - restore_cache: - keys: - - bundle-v1-{{ arch }}-<< parameters.key >> - - run: - name: Install Ruby Dependencies - command: | - gem install bundler --conservative --no-document || \ - gem install rubygems-update -v '<3' && update_rubygems && gem install bundler -v '<2' --no-document - bundle config --local path vendor/bundle - bundle check || (bundle install --jobs=4 --retry=3 && bundle clean) - - save_cache: - paths: - - ./vendor/bundle - key: bundle-v1-{{ arch }}-<< parameters.key >>-{{ checksum "Gemfile.lock" }} - -jobs: - rubocop: - executor: - name: ruby - version: "2.7" - steps: - - checkout - - bundle_install: - key: "2.7" - - run: bundle exec rubocop - spec: - parameters: - ruby: - description: "Ruby version number" - default: "3.3" - type: string - executor: - name: ruby - version: << parameters.ruby >> - steps: - - checkout - - run: echo sshkit=master >> $BASH_ENV - - bundle_install: - key: << parameters.ruby >> - - run: bundle exec rake test - -workflows: - version: 2 - commit-workflow: - jobs: - - rubocop - - spec: - matrix: &matrix - parameters: - ruby: - - "2.4" - - "2.5" - - "2.6" - - "2.7" - - "3.0" - - "3.1" - - "3.2" - - "3.3" - cron-workflow: - jobs: - - rubocop - - spec: - matrix: - <<: *matrix - triggers: - - schedule: - cron: "0 13 * * 6" - filters: - branches: - only: - - main diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ebe4a31..3f80191 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,32 @@ on: branches: - main jobs: - spec_legacy_ruby_19: + rubocop: + name: "RuboCop" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: "2.7" + bundler-cache: true + - run: bundle exec rubocop + test: + name: "Test / Ruby ${{ matrix.ruby }}" + runs-on: ubuntu-latest + strategy: + matrix: + ruby: ["2.4", "2.5", "2.6", "2.7", "3.0", "3.1", "3.2", "3.3"] + env: + sshkit: "master" + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + - run: bundle exec rake test + test_legacy_ruby_19: name: "Test / Ruby 1.9 / SSHKit ${{ matrix.sshkit }}" runs-on: ubuntu-20.04 strategy: @@ -23,7 +48,7 @@ jobs: bundler: "1.17.3" bundler-cache: true - run: bundle exec rake test - spec_legacy_ruby: + test_legacy_ruby: name: "Test / Ruby ${{ matrix.ruby }} / SSHKit ${{ matrix.sshkit }}" runs-on: ubuntu-20.04 strategy: @@ -43,7 +68,7 @@ jobs: spec_all: name: "Test / Ruby (All)" runs-on: ubuntu-latest - needs: [spec_legacy_ruby, spec_legacy_ruby_19] + needs: [test, test_legacy_ruby, test_legacy_ruby_19] if: always() steps: - name: All tests ok diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 107834d..1190dfe 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,7 +19,7 @@ Note that Bundler 1.10 is required for development. Run `gem update bundler` to After checking out the airbrussh repo, run `bin/setup` to install dependencies. Run `rake` to execute airbrussh's tests and RuboCop checks. -Airbrussh is designed to work against multiple versions of SSHKit and Ruby. In order to test this, we use the environment variable `sshkit` in order to run the tests against a specific version. The combinations of sshkit and ruby we support are specified in [.circleci/config.yml](.circleci/config.yml). +Airbrussh is designed to work against multiple versions of SSHKit and Ruby. In order to test this, we use the environment variable `sshkit` in order to run the tests against a specific version. The combinations of sshkit and ruby we support are specified in [.github/workflows/ci.yml](.github/workflows/ci.yml). A Guardfile is also present, so if you'd like to use Guard to do a TDD workflow, then: diff --git a/README.md b/README.md index b115e87..7833504 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Airbrussh [![Gem Version](https://badge.fury.io/rb/airbrussh.svg)](http://badge.fury.io/rb/airbrussh) -[![Build Status](https://circleci.com/gh/mattbrictson/airbrussh/tree/main.svg?style=shield)](https://app.circleci.com/pipelines/github/mattbrictson/airbrussh?branch=main) +[![Build Status](https://github.com/mattbrictson/airbrussh/actions/workflows/ci.yml/badge.svg)](https://github.com/mattbrictson/airbrussh/actions/workflows/ci.yml) [![Build status](https://ci.appveyor.com/api/projects/status/h052rlq54sne3md6/branch/main?svg=true)](https://ci.appveyor.com/project/mattbrictson/airbrussh/branch/main) [![Code Climate](https://codeclimate.com/github/mattbrictson/airbrussh/badges/gpa.svg)](https://codeclimate.com/github/mattbrictson/airbrussh) [![Coverage Status](https://coveralls.io/repos/mattbrictson/airbrussh/badge.svg?branch=main)](https://coveralls.io/r/mattbrictson/airbrussh?branch=main)