Skip to content

Commit

Permalink
Drop Travis CI in favor of Github Actions. (#503)
Browse files Browse the repository at this point in the history
  • Loading branch information
fnando authored Oct 28, 2020
1 parent fd5cb46 commit a8bf4ca
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 24 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Tests

on:
pull_request:
branches:
- main
push:
branches:
- main

schedule:
- cron: "0 10 * * *"

jobs:
build:
name: Tests with Ruby ${{ matrix.ruby }} and ${{ matrix.gemfile }}
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
ruby: ["2.7.x", "2.6.x", "2.5.x"]
gemfile:
- Gemfile
- gemfiles/rails5.gemfile
- gemfiles/rails6.gemfile

steps:
- uses: actions/checkout@v1

- uses: actions/cache@v2
with:
path: vendor/bundle
key: >
${{ runner.os }}-${{ matrix.ruby }}-gems-${{ hashFiles(matrix.gemfile) }}
restore-keys: >
${{ runner.os }}-${{ matrix.ruby }}-gems-${{ hashFiles(matrix.gemfile) }}
- name: Set up Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}

- name: Install gem dependencies
env:
RAILS_ENV: test
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
run: |
gem install bundler
bundle config path vendor/bundle
bundle update --jobs 4 --retry 3
- name: Run Tests
env:
RAILS_ENV: test
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
run: |
bundle exec rake
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Browser

[![Travis-CI](https://travis-ci.org/fnando/browser.svg)](https://travis-ci.org/fnando/browser)
[![Tests](https://github.com/fnando/browser/workflows/Tests/badge.svg)](https://github.com/fnando/browser)
[![Code Climate](https://codeclimate.com/github/fnando/browser/badges/gpa.svg)](https://codeclimate.com/github/fnando/browser)
[![Gem](https://img.shields.io/gem/v/browser.svg)](https://rubygems.org/gems/browser)
[![Gem](https://img.shields.io/gem/dt/browser.svg)](https://rubygems.org/gems/browser)
Expand Down

0 comments on commit a8bf4ca

Please sign in to comment.