Skip to content

Commit

Permalink
Add GitHub Actions CI setup to replace Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrmurach committed Dec 25, 2020
1 parent afd8295 commit e087afc
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 31 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,56 @@
---
name: CI
on:
push:
branches:
- master
paths-ignore:
- "examples/**"
- "*.md"
pull_request:
branches:
- master
paths-ignore:
- "examples/**"
- "*.md"
jobs:
tests:
name: Ruby ${{ matrix.ruby }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
ruby:
- 2.1
- 2.2
- 2.3
- 2.4
- 2.5
- 2.6
- 3.0
- ruby-head
- jruby-9.2.13.0
- jruby-head
- truffleruby-head
include:
- ruby: 2.7
os: ubuntu-latest
coverage: true
env:
COVERAGE: ${{ matrix.coverage }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
continue-on-error: ${{ endsWith(matrix.ruby, 'head') }}
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Install bundler
run: gem install bundler -v '< 2.0'
- name: Install dependencies
run: bundle install --jobs 4 --retry 3
- name: Run tests
run: bundle exec rake ci
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -5,14 +5,14 @@
# Pastel

[![Gem Version](https://badge.fury.io/rb/pastel.svg)][gem]
[![Build Status](https://secure.travis-ci.org/piotrmurach/pastel.svg?branch=master)][travis]
[![Actions CI](https://github.com/piotrmurach/pastel/workflows/CI/badge.svg?branch=master)][gh_actions_ci]
[![Build status](https://ci.appveyor.com/api/projects/status/9blbjfq42o4v1rk4?svg=true)][appveyor]
[![Code Climate](https://codeclimate.com/github/piotrmurach/pastel/badges/gpa.svg)][codeclimate]
[![Coverage Status](https://coveralls.io/repos/github/piotrmurach/pastel/badge.svg)][coverage]
[![Inline docs](http://inch-ci.org/github/piotrmurach/pastel.svg?branch=master)][inchpages]

[gem]: http://badge.fury.io/rb/pastel
[travis]: http://travis-ci.org/piotrmurach/pastel
[gh_actions_ci]: https://github.com/piotrmurach/pastel/actions?query=workflow%3ACI
[appveyor]: https://ci.appveyor.com/project/piotrmurach/pastel
[codeclimate]: https://codeclimate.com/github/piotrmurach/pastel
[coverage]: https://coveralls.io/github/piotrmurach/pastel
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true

if ENV["COVERAGE"] || ENV["TRAVIS"]
if ENV["COVERAGE"] == "true"
require "simplecov"
require "coveralls"

Expand Down

0 comments on commit e087afc

Please sign in to comment.