Skip to content

Commit

Permalink
Replace Travis with GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
lucascaton committed Aug 5, 2021
1 parent 0ebb435 commit de4ff5d
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 39 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI

on: [push, pull_request]

jobs:
test:
strategy:
fail-fast: false

matrix:
ruby:
- 2.5
- 2.6
- 2.7
- 3.0
gemfile:
- gemfiles/rails_5.0.gemfile
- gemfiles/rails_5.1.gemfile
- gemfiles/rails_5.2.gemfile
- gemfiles/rails_6.0.gemfile
- gemfiles/rails_6.1.gemfile
exclude:
# Rails < 6 does not support Ruby 3+:
# https://github.com/rails/rails/issues/40938#issuecomment-751357907
- ruby: 3.0
gemfile: gemfiles/rails_5.0.gemfile
- ruby: 3.0
gemfile: gemfiles/rails_5.1.gemfile
- ruby: 3.0
gemfile: gemfiles/rails_5.2.gemfile

env:
BUNDLE_GEMFILE: "${{ matrix.gemfile }}"

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Rubocop
if: ${{ matrix.ruby == '3.0' }}
run: "bundle exec rubocop"

- name: Tests
run: bundle exec rake spec
37 changes: 0 additions & 37 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Enumerations for Ruby with some magic powers! 🎩

[![Build Status](https://travis-ci.org/lucascaton/enumerate_it.svg?branch=main)](https://travis-ci.org/lucascaton/enumerate_it)
[![CI Status](https://github.com/lucascaton/enumerate_it/workflows/CI/badge.svg)](https://github.com/lucascaton/enumerate_it/actions?query=workflow%3ACI)
[![Gem Version](https://badge.fury.io/rb/enumerate_it.svg)](https://rubygems.org/gems/enumerate_it)
[![Code Climate](https://codeclimate.com/github/lucascaton/enumerate_it/badges/gpa.svg)](https://codeclimate.com/github/lucascaton/enumerate_it)
[![Downloads](https://img.shields.io/gem/dt/enumerate_it.svg)](https://rubygems.org/gems/enumerate_it)
Expand Down Expand Up @@ -407,7 +407,7 @@ You sure can! 😄
* **Rails** `5.0+`

All versions are tested via
[Travis](https://github.com/lucascaton/enumerate_it/blob/main/.travis.yml).
[GitHub Actions](https://github.com/lucascaton/enumerate_it/blob/HEAD/.github/workflows/ci.yml).

#### Can I set a value to always be at the end of a sorted list?

Expand Down

0 comments on commit de4ff5d

Please sign in to comment.