Skip to content

Commit

Permalink
[TASK] Move the CI from Travis CI to GitHub Actions (#118)
Browse files Browse the repository at this point in the history
Travis does not provide free CI for open source projects
anymore. So we need to use another solution.
  • Loading branch information
oliverklee authored Jan 18, 2021
1 parent 97eb97b commit 0059d02
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 32 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
name: CI
on:
push:
branches:
- main
pull_request:
schedule:
- cron: '15 3 * * 1'
jobs:
static-analysis:
name: 'Static analysis'
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: 'Set up Ruby'
uses: actions/setup-ruby@v1
with:
ruby-version: '3.0.0'
- name: 'Check the environment'
run: |
ruby --version
gem --version
- name: 'Install bundler'
run: |
gem install bundler
bundle --version
- name: 'Install gems'
run: 'bundle install --jobs 4 --retry 3'
- name: 'Run RuboCop'
run: |
bundle exec rubocop Gemfile \
gemfiles/Gemfile.rails-5.2 gemfiles/Gemfile.rails-6.0 \
gemfiles/Gemfile.rails-6.1 lib/ test/ Rakefile
test:
name: "Tests: Ruby ${{ matrix.ruby }} / Rails ${{ matrix.rails }}"
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: 'Set up Ruby'
uses: actions/setup-ruby@v1
with:
ruby-version: '${{ matrix.ruby }}'
- name: 'Check the environment'
run: |
ruby --version
gem --version
- name: 'Install bundler'
run: |
gem install bundler
bundle --version
- name: 'Install gems'
env:
MATRIX_RAILS_VERSION: ${{ matrix.rails }}
run: |
export BUNDLE_GEMFILE="${GITHUB_WORKSPACE}/gemfiles/Gemfile.rails-${MATRIX_RAILS_VERSION}"
bundle install --jobs 4 --retry 3
- name: 'Run the tests'
run: 'bundle exec rake --trace test'
strategy:
fail-fast: false
matrix:
ruby:
- '2.5.8'
- '2.6.6'
- '2.7.2'
rails:
- '5.2'
- '6.0'
- '6.1'
31 changes: 0 additions & 31 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 @@
# Page title helper

[![Build Status](https://travis-ci.org/lwe/page_title_helper.svg?branch=master)](https://travis-ci.org/lwe/page_title_helper)
[![GitHub CI Status](https://github.com/lwe/page_title_helper/workflows/CI/badge.svg?branch=main)](https://github.com/lwe/page_title_helper/actions)
[![Gem Version](https://badge.fury.io/rb/page_title_helper.svg)](https://badge.fury.io/rb/page_title_helper)

This project adheres to [Semantic Versioning](https://semver.org/).
Expand Down

0 comments on commit 0059d02

Please sign in to comment.