Skip to content

Commit

Permalink
Merge pull request #517 from Dynamoid/set-up-github-actions
Browse files Browse the repository at this point in the history
Set up CI with GitHub Actions
  • Loading branch information
andrykonchin committed Oct 2, 2021
2 parents c4457e5 + a94bb82 commit 1752cea
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 71 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,71 @@
name: CI

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
tests:
runs-on: ubuntu-latest

strategy:
fail-fast: false

matrix:
ruby: [2.3, 2.4, 2.5, 2.6, 2.7, 3.0]
gemfile: [rails_4_2, rails_5_0, rails_5_1, rails_5_2, rails_6_0, rails_6_1]
exclude:

# Rails 6.0 requires Ruby 2.5 and above.
- gemfile: rails_6_0
ruby: 2.3
- gemfile: rails_6_0
ruby: 2.4

# Rails 6.1 requires Ruby 2.5 and above.
- gemfile: rails_6_1
ruby: 2.3
- gemfile: rails_6_1
ruby: 2.4

# Rails supports Ruby 3.0 since 6.0 only. So skip all the other Rails versions.
- ruby: 3.0
gemfile: rails_4_2
- ruby: 3.0
gemfile: rails_5_0
- ruby: 3.0
gemfile: rails_5_1
- ruby: 3.0
gemfile: rails_5_2

name: ${{ matrix.gemfile }}, Ruby ${{ matrix.ruby }}

steps:
- uses: actions/checkout@v2

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

- name: Bundle install
run: |
bundle config set gemfile "${GITHUB_WORKSPACE}/gemfiles/${{ matrix.gemfile }}.gemfile"
bundle install --jobs 4 --retry 3
- name: Start dynamodb-local
run: |
docker-compose up -d
- name: Run RSpec tests
run: |
bundle exec rspec
- name: Stop dynamodb-local
run: |
docker-compose down
70 changes: 0 additions & 70 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
@@ -1,6 +1,6 @@
# Dynamoid

[![Build Status](https://travis-ci.org/Dynamoid/dynamoid.svg?branch=master)](https://travis-ci.org/Dynamoid/dynamoid)
[![Build Status](https://github.com/Dynamoid/dynamoid/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/Dynamoid/dynamoid/actions/workflows/ci.yml/badge.svg?branch=master)
[![Code Climate](https://codeclimate.com/github/Dynamoid/dynamoid.svg)](https://codeclimate.com/github/Dynamoid/dynamoid)
[![Coverage Status](https://coveralls.io/repos/github/Dynamoid/dynamoid/badge.svg?branch=master)](https://coveralls.io/github/Dynamoid/dynamoid?branch=master)
[![CodeTriage Helpers](https://www.codetriage.com/dynamoid/dynamoid/badges/users.svg)](https://www.codetriage.com/dynamoid/dynamoid)
Expand Down

0 comments on commit 1752cea

Please sign in to comment.