Skip to content

Commit

Permalink
Merge branch 'main' into test-turbo-stream-rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
Spone authored Feb 14, 2022
2 parents 6a7700d + 18c27ad commit f98eb8c
Show file tree
Hide file tree
Showing 49 changed files with 805 additions and 336 deletions.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,5 @@

/.devcontainer/**/* @boardfish
/script/replicate-bug @boardfish
/lib/view_component/docs_builder_component.rb @boardfish
/lib/view_component/docs_builder_component.html.erb @boardfish
19 changes: 16 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,23 @@ jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rails_version: ['5.2.6', '6.0.4.4', '6.1.4.4', 'main']
ruby_version: ['2.5', '2.6', '2.7', '3.0']
rails_version: ['5.2.6', '6.0.4.4', '6.1.4.4', '7.0.1', 'main']
ruby_version: ['2.5', '2.6', '2.7', '3.0', '3.1']
exclude:
- rails_version: '5.2.6'
ruby_version: '3.0'
- rails_version: '5.2.6'
ruby_version: '3.1'
- rails_version: '6.0.4.4'
ruby_version: '3.0'
- rails_version: '6.0.4.4'
ruby_version: '3.1'
- rails_version: '7.0.1'
ruby_version: '2.5'
- rails_version: '7.0.1'
ruby_version: '2.6'
- rails_version: 'main'
ruby_version: '2.5'
- rails_version: 'main'
Expand Down Expand Up @@ -87,13 +96,15 @@ jobs:
- name: Build and test with Rake
run: |
cd primer_view_components
yarn install
yarn
cd demo && yarn && cd ..
bundle config path vendor/bundle
bundle install
bundle exec rake docs:preview
bundle exec rake
env:
VIEW_COMPONENT_PATH: ../view_component
RAILS_VERSION: '~> 6.1.0'
coverage:
needs: test
runs-on: ubuntu-latest
Expand All @@ -114,3 +125,5 @@ jobs:
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
bundle exec rake coverage:report
env:
RAILS_VERSION: '~> 7.0.0'
4 changes: 4 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ jobs:
bundle install --jobs 4 --retry 3
bundle exec rubocop
bundle exec erblint **/*.html.erb
env:
RAILS_VERSION: '~> 7.0.0'
docs_api:
needs: lint
runs-on: ubuntu-latest
Expand All @@ -99,5 +101,7 @@ jobs:
bundle config path vendor/bundle
bundle update
bundle exec rake docs:build
env:
RAILS_VERSION: '~> 7.0.0'
- name: Error out if docs/api.md has to be regenerated
run: git diff --exit-code docs/api.md || echo '::error file=docs/api.md,line=1,col=1::Please make sure to run `bundle exec rake docs:build` to regenerate docs/api.md to include changes in YARD comments from this pull request.'
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ Layout/DotPosition:
Layout/LineLength:
Max: 120
Enabled: true

Layout/SpaceBeforeBrackets:
Enabled: true
5 changes: 5 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ appraise "rails-6.1" do
gem "rails", "~> 6.1.0"
gem "tailwindcss-rails", "~> 2.0"
gem "turbo-rails", "~> 1"

# Required for Ruby 3.1.0
gem "net-smtp", require: false
gem "net-imap", require: false
gem "net-pop", require: false
end

appraise "rails-7.0" do
Expand Down
6 changes: 6 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@ rails_version = "#{ENV['RAILS_VERSION'] || 'main'}"

gem "capybara", "~> 3"
gem "rails", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version

if RUBY_VERSION >= "3.1"
gem "net-imap", require: false
gem "net-pop", require: false
gem "net-smtp", require: false
end
Loading

0 comments on commit f98eb8c

Please sign in to comment.