diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..33c31df6 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,51 @@ +--- + +name: ci + +on: + pull_request: + + push: + branches: + - master + +jobs: + test: + runs-on: ubuntu-20.04 + + timeout-minutes: 15 + + strategy: + fail-fast: false + + matrix: + ruby: [2.5.8, 2.6.6, 2.7.1, jruby-9.2.11.1] + + env: + BUNDLE_PATH: vendor/bundle + + steps: + - uses: actions/checkout@v2 + + - uses: ruby/setup-ruby@v1 + with: + ruby-version: 2.7.2 + bundler: none + + - name: Install a specific rubygems version + run: gem update --system 3.2.0.rc.1 + + - name: Install a specific bundler version + run: gem install bundler -v 2.1.4 + + - name: Restore cached dependencies + uses: actions/cache@v2 + with: + path: ${{ env.BUNDLE_PATH }} + key: gems-${{ matrix.ruby }}-${{ hashFiles('current_gemfile.lock') }} + + - name: Install dependencies + run: bundle install --jobs 3 + + - name: Run tests + run: bundle exec rake diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0936e655..00000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: ruby -sudo: false -before_install: - - gem update --system 3.2.0.rc.1 - - gem install bundler:2.1.4 -rvm: - - 2.5.8 - - 2.6.6 - - 2.7.1 - - jruby-9.2.11.1 -branches: - only: - - master -cache: bundler diff --git a/README.md b/README.md index 6d1d6aef..54b0d6d6 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [Arbre][docs] makes it easy to generate HTML directly in Ruby. This gem was extracted from [Active Admin](https://github.com/activeadmin/active_admin). [![Version ][rubygems_badge]][rubygems] -[![Travis CI ][travis_badge]][travis] +[![Github Actions ][actions_badge]][actions] [![Tidelift ][tidelift_badge]][tidelift] ## Goals @@ -33,8 +33,8 @@ Tidelift will coordinate the fix and disclosure. [rubygems_badge]: http://img.shields.io/gem/v/arbre.svg [rubygems]: https://rubygems.org/gems/arbre -[travis_badge]: http://img.shields.io/travis/activeadmin/arbre/master.svg -[travis]: https://travis-ci.org/activeadmin/arbre +[actions_badge]: https://github.com/activeadmin/arbre/workflows/ci/badge.svg +[actions]: https://github.com/activeadmin/arbre/actions [tidelift_badge]: https://tidelift.com/badges/github/activeadmin/arbre [tidelift]: https://tidelift.com/subscription/pkg/rubygems-arbre?utm_source=rubygems-arbre&utm_medium=referral&utm_campaign=readme