Skip to content

Commit

Permalink
Configure GitHub Actions as CI
Browse files Browse the repository at this point in the history
  • Loading branch information
HashNotAdam committed Nov 11, 2023
1 parent 80dd93c commit ad8a6ab
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 2 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: CI
on: [push]

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: ["3.1", "3.2"]

steps:
- uses: actions/checkout@v4

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

- name: Install Appraisal dependencies
run: bundle exec appraisal install

- name: Appraise Rails 6.1
run: bundle exec appraisal rails-6.1 rspec

- name: Appraise Rails 7.0
run: bundle exec appraisal rails-7.0 rspec

- name: Appraise Rails 7.1
run: bundle exec appraisal rails-7.1 rspec

- name: Appraise Rails Edge
run: bundle exec appraisal rails-edge rspec

- name: Lint with Rubocop
run: bundle exec rubocop
5 changes: 4 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@ Rails:
Enabled: true

AllCops:
TargetRubyVersion: 2.5
TargetRubyVersion: 3.1
Exclude:
- Rakefile
- bin/**/*
- gemfiles/**/*
- spec/dummy/db/schema.rb
- vendor/bundle/**/*
NewCops: enable

Layout/DotPosition:
Expand Down
4 changes: 4 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ GEM
nio4r (2.5.9)
nokogiri (1.15.4-arm64-darwin)
racc (~> 1.4)
nokogiri (1.15.4-x86_64-linux)
racc (~> 1.4)
parallel (1.23.0)
parser (3.2.2.4)
ast (~> 2.4.1)
Expand Down Expand Up @@ -246,6 +248,7 @@ GEM
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
sqlite3 (1.6.8-arm64-darwin)
sqlite3 (1.6.8-x86_64-linux)
stringio (3.0.9)
thor (1.3.0)
timeout (0.4.1)
Expand All @@ -260,6 +263,7 @@ GEM

PLATFORMS
arm64-darwin-22
x86_64-linux

DEPENDENCIES
appraisal!
Expand Down
2 changes: 1 addition & 1 deletion cohousing.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
spec.summary = "A security-first approach to tenanting a Ruby on Rails application"
spec.license = "MIT"

spec.required_ruby_version = ">= 2.5.0"
spec.required_ruby_version = ">= 3.1.0"

spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = "https://github.com/HashNotAdam/cohousing"
Expand Down

0 comments on commit ad8a6ab

Please sign in to comment.