diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..db2adbd3a --- /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: + - { os: ubuntu-latest , ruby: 2.5 } + - { os: ubuntu-latest , ruby: 2.6 } + - { os: ubuntu-latest , ruby: 2.7 } + - { os: ubuntu-latest , ruby: 3.0 } + - { os: ubuntu-latest , ruby: jruby, allow-failure: true } + - { os: ubuntu-latest , ruby: jruby-head, allow-failure: true } + - { os: ubuntu-latest , 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 \ No newline at end of file diff --git a/.github/workflows/isolated.yml b/.github/workflows/isolated.yml new file mode 100644 index 000000000..887aa741c --- /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 \ No newline at end of file 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