Skip to content

Commit

Permalink
Migrate CI to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelfranca committed Sep 22, 2022
1 parent 1fd7707 commit c33accf
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 17 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI
on: [push, pull_request]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: [ '2.7', '3.0', '3.1', 'head' ]
rails: [ '6.0', '6.1', '7.0', 'edge' ]
exclude:
- ruby: '3.1'
rails: '6.0'
- ruby: '3.1'
rails: '6.1'

env:
RAILS_VERSION: ${{ matrix.rails }}

steps:
- uses: actions/checkout@v2

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Run unit tests
run: bundle exec rake test:unit
timeout-minutes: 3

- name: Run acceptance tests
run: bundle exec rake test:acceptance
timeout-minutes: 10
if: ${{ matrix.rails != 'edge' && matrix.ruby != 'head' }} # Acceptance tests use `gem install rails && rails new`
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

8 changes: 7 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,10 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
# Specify your gem's dependencies in spring-watcher-listen.gemspec
gemspec

gem "spring", github: "rails/spring", branch: :main
if ENV["RAILS_VERSION"] == "edge"
gem "activesupport", github: "rails/rails", branch: "main"
elsif ENV["RAILS_VERSION"]
gem "activesupport", "~> #{ENV["RAILS_VERSION"]}.0"
end

gem "spring", github: "rails/spring", branch: "main"

0 comments on commit c33accf

Please sign in to comment.