Skip to content

Commit c33accf

Browse files
committed
Migrate CI to GitHub Actions
1 parent 1fd7707 commit c33accf

File tree

3 files changed

+43
-17
lines changed

3 files changed

+43
-17
lines changed

.github/workflows/ci.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: CI
2+
on: [push, pull_request]
3+
jobs:
4+
tests:
5+
runs-on: ubuntu-latest
6+
strategy:
7+
fail-fast: false
8+
matrix:
9+
ruby: [ '2.7', '3.0', '3.1', 'head' ]
10+
rails: [ '6.0', '6.1', '7.0', 'edge' ]
11+
exclude:
12+
- ruby: '3.1'
13+
rails: '6.0'
14+
- ruby: '3.1'
15+
rails: '6.1'
16+
17+
env:
18+
RAILS_VERSION: ${{ matrix.rails }}
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
23+
- name: Set up Ruby
24+
uses: ruby/setup-ruby@v1
25+
with:
26+
ruby-version: ${{ matrix.ruby }}
27+
bundler-cache: true
28+
29+
- name: Run unit tests
30+
run: bundle exec rake test:unit
31+
timeout-minutes: 3
32+
33+
- name: Run acceptance tests
34+
run: bundle exec rake test:acceptance
35+
timeout-minutes: 10
36+
if: ${{ matrix.rails != 'edge' && matrix.ruby != 'head' }} # Acceptance tests use `gem install rails && rails new`

.travis.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

Gemfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,10 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
44
# Specify your gem's dependencies in spring-watcher-listen.gemspec
55
gemspec
66

7-
gem "spring", github: "rails/spring", branch: :main
7+
if ENV["RAILS_VERSION"] == "edge"
8+
gem "activesupport", github: "rails/rails", branch: "main"
9+
elsif ENV["RAILS_VERSION"]
10+
gem "activesupport", "~> #{ENV["RAILS_VERSION"]}.0"
11+
end
12+
13+
gem "spring", github: "rails/spring", branch: "main"

0 commit comments

Comments
 (0)