Skip to content

Commit b1894ef

Browse files
committed
Migrate CI from Travis CI to GitHub Actions
Signed-off-by: Takuya Noguchi <[email protected]>
1 parent 770abdb commit b1894ef

File tree

4 files changed

+112
-84
lines changed

4 files changed

+112
-84
lines changed

.github/workflows/ruby.yml

+108
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
name: Ruby test
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
name: Ruby test
8+
runs-on: ubuntu-20.04
9+
continue-on-error: ${{ matrix.experimental }}
10+
env:
11+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
12+
BUNDLE_JOBS: 4
13+
BUNDLE_RETRY: 3
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
ruby: [
18+
2.2.10,
19+
2.3.8,
20+
2.4.10,
21+
2.5.8,
22+
2.6.6,
23+
2.7.1,
24+
3.0.0
25+
]
26+
gemfile: [
27+
"rails_5_0",
28+
"rails_5_1",
29+
"rails_5_2",
30+
"rails_6_0",
31+
"rails_6_1",
32+
"rails_head"
33+
]
34+
experimental: [false]
35+
exclude:
36+
- ruby: 2.7.1
37+
gemfile: rails_5_0
38+
- ruby: 3.0.0
39+
gemfile: rails_5_0
40+
- ruby: head
41+
gemfile: rails_5_0
42+
- ruby: 2.7.1
43+
gemfile: rails_5_1
44+
- ruby: 3.0.0
45+
gemfile: rails_5_1
46+
- ruby: head
47+
gemfile: rails_5_1
48+
- ruby: 2.2.10
49+
gemfile: rails_5_2
50+
- ruby: 2.7.1
51+
gemfile: rails_5_2
52+
- ruby: 3.0.0
53+
gemfile: rails_5_2
54+
- ruby: head
55+
gemfile: rails_5_2
56+
- ruby: 2.2.10
57+
gemfile: rails_6_0
58+
- ruby: 2.3.8
59+
gemfile: rails_6_0
60+
- ruby: 2.4.10
61+
gemfile: rails_6_0
62+
- ruby: 3.0.0
63+
gemfile: rails_6_0
64+
- ruby: head
65+
gemfile: rails_6_0
66+
- ruby: 2.2.10
67+
gemfile: rails_6_1
68+
- ruby: 2.3.8
69+
gemfile: rails_6_1
70+
- ruby: 2.4.10
71+
gemfile: rails_6_1
72+
- ruby: 2.2.10
73+
gemfile: rails_head
74+
- ruby: 2.3.8
75+
gemfile: rails_head
76+
- ruby: 2.4.10
77+
gemfile: rails_head
78+
- ruby: 2.5.8
79+
gemfile: rails_head
80+
- ruby: 2.6.6
81+
gemfile: rails_head
82+
- ruby: 2.7.1
83+
gemfile: rails_head
84+
experimental: false
85+
- ruby: 3.0.0
86+
gemfile: rails_head
87+
experimental: false
88+
include:
89+
- ruby: 2.7.1
90+
gemfile: rails_head
91+
experimental: true
92+
- ruby: 3.0.0
93+
gemfile: rails_head
94+
experimental: true
95+
- ruby: head
96+
gemfile: rails_head
97+
experimental: true
98+
99+
steps:
100+
- uses: actions/checkout@v2
101+
102+
- uses: ruby/setup-ruby@v1
103+
with:
104+
ruby-version: ${{ matrix.ruby }}
105+
bundler-cache: true
106+
107+
- name: Ruby test
108+
run: bundle exec rake

.travis.yml

-80
This file was deleted.

CONTRIBUTING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
Contributing to Jbuilder
22
=====================
33

4-
[![Build Status](https://api.travis-ci.org/rails/jbuilder.svg?branch=master)][travis]
4+
[![Build Status](https://github.com/rails/jbuilder/workflows/Ruby%20test/badge.svg)][test]
55
[![Gem Version](https://badge.fury.io/rb/jbuilder.svg)][gem]
66
[![Code Climate](https://codeclimate.com/github/rails/jbuilder/badges/gpa.svg)][codeclimate]
77

8-
[travis]: https://travis-ci.org/rails/jbuilder
8+
[test]: https://github.com/rails/jbuilder/actions?query=branch%3Amaster
99
[gem]: https://rubygems.org/gems/jbuilder
1010
[codeclimate]: https://codeclimate.com/github/rails/jbuilder
1111

@@ -95,7 +95,7 @@ git push origin my-feature-branch -f
9595

9696
#### Check on Your Pull Request
9797

98-
Go back to your pull request after a few minutes and see whether it passed muster with Travis-CI. Everything should look green, otherwise fix issues and amend your commit as described above.
98+
Go back to your pull request after a few minutes and see whether it passed muster with GitHub Actions. Everything should look green, otherwise fix issues and amend your commit as described above.
9999

100100
#### Be Patient
101101

Rakefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ require "bundler/setup"
22
require "bundler/gem_tasks"
33
require "rake/testtask"
44

5-
if !ENV["APPRAISAL_INITIALIZED"] && !ENV["TRAVIS"]
5+
if !ENV["APPRAISAL_INITIALIZED"] && !ENV["CI"]
66
require "appraisal/task"
77
Appraisal::Task.new
88
task default: :appraisal

0 commit comments

Comments
 (0)