Skip to content

Commit

Permalink
Merge pull request #21 from clio/ci
Browse files Browse the repository at this point in the history
Add CI
  • Loading branch information
peerkleio authored Jun 10, 2024
2 parents 9dc38c9 + b8844e5 commit afd8046
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 64 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: CI

on:
workflow_dispatch:
pull_request:

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby-version:
- 2.7
active-record-version:
- 5.2.0
env:
ACTIVE_RECORD_VERSION: "${{ matrix.active-record-version }}"
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "${{ matrix.ruby-version }}"
bundler-cache: true
- name: Run tests
run: bundle exec rspec --format documentation
13 changes: 13 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,16 @@ source 'https://rubygems.org'

# Specify your gem's dependencies in inheritance_integer_type.gemspec
gemspec

ar_version = ENV["ACTIVE_RECORD_VERSION"] || "default"

ar = case ar_version
when "master"
{ github: "rails/rails" }
when "default"
">= 5.2"
else
"~> #{ar_version}"
end

gem "activerecord", ar
63 changes: 0 additions & 63 deletions Gemfile.lock

This file was deleted.

2 changes: 1 addition & 1 deletion inheritance_integer_type.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "bundler"
spec.add_development_dependency "rake"
spec.add_development_dependency "rspec"
spec.add_development_dependency "activerecord", "< 6.0"
spec.add_development_dependency "activerecord", ">= 5.2"
spec.add_development_dependency "sqlite3", "~> 1.3.6"
spec.add_development_dependency "pry"
end

0 comments on commit afd8046

Please sign in to comment.