Skip to content

Commit

Permalink
Use Github Actions for CI (#442)
Browse files Browse the repository at this point in the history
* Use Github Actions for CI

* Add back old Rails versions

* Only test Rails 5 on Ruby 2.7

---------

Co-authored-by: Josh Branham <josh.php@gmail.com>
  • Loading branch information
mlarraz and joshbranham committed May 26, 2023
1 parent dee8d41 commit 6bab9de
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
40 changes: 40 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI

on:
push:
branches:
- master
pull_request:

jobs:
test:
name: Ruby ${{ matrix.ruby }} / ActiveRecord ${{ matrix.active_record }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
active_record:
- '6.0'
- '6.1'
- '7.0'
ruby:
- '2.7'
- '3.0'
- '3.1'
- '3.2'
include:
- active_record: '5.1'
ruby: '2.7'
- active_record: '5.2'
ruby: '2.7'
env:
ACTIVERECORD: ${{ matrix.active_record }}
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: |
bundle exec rake test
2 changes: 1 addition & 1 deletion attr_encrypted.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Gem::Specification.new do |s|
s.add_dependency('encryptor', ['~> 3.0.0'])
# support for testing with specific active record version
activerecord_version = if ENV.key?('ACTIVERECORD')
"~> #{ENV['ACTIVERECORD']}"
"~> #{ENV['ACTIVERECORD']}.0"
else
'>= 2.0.0'
end
Expand Down

0 comments on commit 6bab9de

Please sign in to comment.