Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #517 from Dynamoid/set-up-github-actions
Set up CI with GitHub Actions
- Loading branch information
Showing
3 changed files
with
72 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters