Skip to content

Commit

Permalink
Drop travis.yml in favour of github actions. Move rubocop and all ci
Browse files Browse the repository at this point in the history
tests into GitHub actions.
  • Loading branch information
hahmed committed Jun 15, 2021
1 parent 2c38d99 commit 01cefe5
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 40 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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
20 changes: 20 additions & 0 deletions .github/workflows/isolated.yml
Original file line number Diff line number Diff line change
@@ -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
28 changes: 28 additions & 0 deletions .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
@@ -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
40 changes: 0 additions & 40 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 01cefe5

Please sign in to comment.