-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test installer commands #149
Open
jonathanhefner
wants to merge
7
commits into
rails:main
Choose a base branch
from
jonathanhefner:test-installer
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
20ab5be
Add testing infrastructure
jonathanhefner 048b1f1
Test shared behavior of installer commands
jonathanhefner 9c585cf
Test specific behavior of css:install:bootstrap
jonathanhefner d3a432c
Test specific behavior of css:install:bulma
jonathanhefner 1c790d0
Test specific behavior of css:install:postcss
jonathanhefner 27bcdd1
Test specific behavior of css:install:sass
jonathanhefner 59ac500
Test specific behavior of css:install:tailwind
jonathanhefner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,40 @@ | ||
name: CI | ||
on: [push, pull_request] | ||
jobs: | ||
tests: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ruby-version: | ||
- "3.1" | ||
- "3.2" | ||
- "3.3" | ||
gemfile: | ||
- gemfiles/rails_7_0.gemfile | ||
- gemfiles/rails_7_1.gemfile | ||
- gemfiles/rails_main.gemfile | ||
continue-on-error: [ false ] | ||
|
||
name: ${{ format('Tests (Ruby {0}, {1})', matrix.ruby-version, matrix.gemfile) }} | ||
runs-on: ubuntu-latest | ||
continue-on-error: ${{ matrix.continue-on-error }} | ||
|
||
env: | ||
BUNDLE_GEMFILE: ${{ matrix.gemfile }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Remove Gemfile lock | ||
run: | | ||
rm -f $BUNDLE_GEMFILE.lock | ||
|
||
- name: Install Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby-version }} | ||
bundler-cache: true | ||
|
||
- name: Run tests | ||
run: | | ||
bundle exec rake |
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 |
---|---|---|
@@ -1,2 +1,6 @@ | ||
/tmp/ | ||
.byebug_history | ||
*.gem | ||
|
||
# Ignore Gemfile.lock files for Rails main branch. | ||
/gemfiles/rails_main*.gemfile.lock |
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,14 @@ | ||
appraise "rails_7_0" do | ||
gem "rails", "~> 7.0.0" | ||
gem "propshaft" | ||
end | ||
|
||
appraise "rails_7_1" do | ||
gem "rails", "~> 7.1.0" | ||
gem "propshaft" | ||
end | ||
|
||
appraise "rails_main" do | ||
gem "rails", github: "rails/rails", branch: "main" | ||
gem "propshaft" | ||
end |
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 |
---|---|---|
|
@@ -4,9 +4,9 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |
# Specify your gem's dependencies in importmap-rails.gemspec. | ||
gemspec | ||
|
||
rails_version = ENV["RAILS_VERSION"] || "6.1.0" | ||
gem "rails", "~> #{rails_version}" | ||
|
||
gem "appraisal" | ||
gem "rails", "~> 6.0.0" | ||
gem "sprockets-rails" | ||
Comment on lines
-7
to
+9
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file defaulted the Rails version to 6.1, but the gemspec specifies 6.0. Which is correct? (Or do we want to jump to Rails 7.0?) |
||
gem "sqlite3" | ||
|
||
group :test do | ||
|
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
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,10 @@ | ||
require "bundler/setup" | ||
require "bundler/gem_tasks" | ||
require "rake/testtask" | ||
|
||
Rake::TestTask.new(:test) do |t| | ||
t.libs << "test" | ||
t.pattern = "test/**/*_test.rb" | ||
end | ||
|
||
task default: :test |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only tests with Rails >= 7.0 and Ruby >= 3.1. I can add entries for Rails 6.0 and 6.1, and older versions of Ruby, but first I wanted to confirm which versions we want to support.