From 5471e5d5d8c9165c2fc96fb0c0eadfbcda3f3a6f Mon Sep 17 00:00:00 2001 From: Haroon Ahmed Date: Mon, 14 Jun 2021 21:40:41 +0100 Subject: [PATCH] Drop travis.yml in favour of github actions. Move rubocop and all ci tests into GitHub actions. --- .github/workflows/ci.yml | 27 +++++++++++++++++++++++ .github/workflows/isolated.yml | 20 +++++++++++++++++ .github/workflows/rubocop.yml | 28 ++++++++++++++++++++++++ .travis.yml | 40 ---------------------------------- CHANGELOG.md | 1 + CONTRIBUTING.md | 2 -- 6 files changed, 76 insertions(+), 42 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/isolated.yml create mode 100644 .github/workflows/rubocop.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..d9f1d598d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,27 @@ +name: CI +on: [push, pull_request] +jobs: + tests: + runs-on: ubuntu-latest + strategy: + matrix: + include: + - { ruby: 2.5 } + - { ruby: 2.6 } + - { ruby: 2.7 } + - { ruby: 3.0 } + - { ruby: jruby, allow-failure: true } + - { ruby: jruby-head, allow-failure: true } + - { ruby: head, allow-failure: true } + + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + + - name: Run tests + timeout-minutes: 10 + run: bundle exec rake diff --git a/.github/workflows/isolated.yml b/.github/workflows/isolated.yml new file mode 100644 index 000000000..34b35e83c --- /dev/null +++ b/.github/workflows/isolated.yml @@ -0,0 +1,20 @@ +name: CI isolated tests +on: [push, pull_request] +jobs: + tests: + runs-on: ubuntu-latest + strategy: + matrix: + ruby: [2.7] + + steps: + - uses: actions/checkout@v2 + + - 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_isolated diff --git a/.github/workflows/rubocop.yml b/.github/workflows/rubocop.yml new file mode 100644 index 000000000..d8f0ae0b5 --- /dev/null +++ b/.github/workflows/rubocop.yml @@ -0,0 +1,28 @@ +name: RuboCop + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + ruby: [2.7] + + steps: + - uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: /home/runner/bundle + key: bundle-use-ruby-gems-${{ hashFiles('**/Gemfile.lock') }} + restore-keys: bundle-use-ruby-gems- + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + - name: Bundle install + run: | + gem install bundler -v 2.1.4 + bundle config path /home/runner/bundle + bundle install + - name: Run linter + run: bundle exec rubocop --parallel diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 3ad6fd756..000000000 --- a/.travis.yml +++ /dev/null @@ -1,40 +0,0 @@ -language: ruby - -cache: bundler - -sudo: required -before_script: "unset _JAVA_OPTIONS" -before_install: gem install bundler -v '<2' - -rvm: - - 2.5.3 - - 2.6.0 - - 2.7.1 - - jruby-9.2.5.0 - - jruby-head - - ruby-head - -matrix: - include: - - rvm: 2.7.1 - script: bundle exec rake test_isolated - - rvm: 2.7.1 - script: bundle exec rake rubocop - allow_failures: - - rvm: jruby-9.2.5.0 - - rvm: jruby-head - - rvm: ruby-head - fast_finish: true - -notifications: - email: false - irc: - on_success: change - on_failure: always - channels: - - "irc.freenode.org#rails-contrib" - campfire: - on_success: change - on_failure: always - rooms: - - secure: "bJyiK4EXGfm0EhAId/QqIEdhPCx8BjxUKvx1h0+wgrsUm8BDoEN7tg2wqoGWU2KfzqLdx77wZVQXbmksOgmNcMGKJed5uNNMpAG4B+AQYTEX0odFRgOZKdkMtypga9CNIkKVgeSKhd6BY+g2AV6wvJ0Jq056uXpGkqK5OEFOpQc=" diff --git a/CHANGELOG.md b/CHANGELOG.md index efac5a1b0..e78793d20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Get upgrade notes from Sprockets 3.x to 4.x at https://github.com/rails/sprocket ## Master +- Move to GitHub actions.[#709](https://github.com/rails/sprockets/pull/709) - Remove remaining support for Ruby < 2.4.[#672](https://github.com/rails/sprockets/pull/672) ## 4.0.2 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index edd03ccdc..56ddcce90 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,8 +1,6 @@ Contributing to Sprockets ===================== -[![Build Status](https://secure.travis-ci.org/rails/sprockets.svg?branch=master)](http://travis-ci.org/rails/sprockets) - Sprockets is work of [hundreds of contributors](https://github.com/rails/sprockets/graphs/contributors). You're encouraged to submit [pull requests](https://github.com/rails/sprockets/pulls), [propose features and discuss issues](https://github.com/rails/sprockets/issues). #### Fork the Project