diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..5cdeae64 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,32 @@ +name: test on CI +on: + push: + branches: [ master ] + pull_request: +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + ruby: [ "2.0", "2.1", "2.2", "2.3", "2.4", "2.5", "2.6", "2.7", "3.0", "3.1", "3.2", "head" ] + steps: + - uses: actions/checkout@v3 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + - name: Run tests + run: bundle exec rake test:units + + rubocop: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: "2.7" + bundler-cache: true + - name: Run rubocop + run: bundle exec rake lint diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ec4ca595..00000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -language: ruby -rvm: - - 3.0 - - 2.7 - - 2.6 - - 2.5 - - 2.4 - - 2.3 - - 2.2 - - 2.1 - - 2.0 -branches: - only: - - master -matrix: - include: - # Run Danger only once, on 2.5 - - rvm: 2.5 - script: bundle exec danger -script: bundle exec rake test:units lint diff --git a/README.md b/README.md index 5c4dacef..31f16d16 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ more servers. [![Gem Version](https://badge.fury.io/rb/sshkit.svg)](https://rubygems.org/gems/sshkit) -[![Build Status](https://travis-ci.org/capistrano/sshkit.svg?branch=master)](https://travis-ci.org/capistrano/sshkit) +[![Build Status](https://github.com/capistrano/sshkit/actions/workflows/ci.yml/badge.svg)](https://github.com/capistrano/sshkit/actions/workflows/ci.yml) ## Example