diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ebe4a31..062dbe5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,31 @@ on: branches: - main jobs: - spec_legacy_ruby_19: + rubocop: + name: "RuboCop" + runs-on: ubuntu-latest + - 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 +47,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 +67,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