forked from adamsalter/sitemap_generator
-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Housekeeping This includes : * Remove useless file * Move development dependencies to Gemfile * Switch from CircleCI to GithubActions * use Appraisal to specify Rails version during CI * Add support for latest Rails versions * Add support for latest Ruby versions * Disable RSpec monkey patch * Run tests in random order * Cleanup spec_helper.rb * Load parent Gemfile in integration tests * Cleanup spec_helper.rb in integration tests * Improve RSpec config in integration tests * Coding style * Improve DB loading/seeding in integration tests * Add bin/rackup binstub so we can start dummy application * Add simplecov to have code coverage
- Loading branch information
1 parent
ed28e59
commit ccfb3f3
Showing
63 changed files
with
796 additions
and
232 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,165 @@ | ||
--- | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' | ||
pull_request: | ||
branches: | ||
- '**' | ||
schedule: | ||
- cron: '0 4 1 * *' | ||
|
||
jobs: | ||
rspec: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ruby: | ||
- '3.3' | ||
- '3.2' | ||
- '3.1' | ||
- '3.0' | ||
- '2.7' | ||
- '2.6' | ||
- '2.5' | ||
rails: | ||
- rails_7.2 | ||
- rails_7.1 | ||
- rails_7.0 | ||
- rails_6.1 | ||
- rails_6.0 | ||
- rails_5.2 | ||
|
||
exclude: | ||
- ruby: '2.5' | ||
rails: 'rails_7.0' | ||
- ruby: '2.5' | ||
rails: 'rails_7.1' | ||
- ruby: '2.5' | ||
rails: 'rails_7.2' | ||
|
||
- ruby: '2.6' | ||
rails: 'rails_7.0' | ||
- ruby: '2.6' | ||
rails: 'rails_7.1' | ||
- ruby: '2.6' | ||
rails: 'rails_7.2' | ||
|
||
- ruby: '2.7' | ||
rails: 'rails_5.2' | ||
- ruby: '2.7' | ||
rails: 'rails_7.2' | ||
|
||
- ruby: '3.0' | ||
rails: 'rails_5.2' | ||
- ruby: '3.0' | ||
rails: 'rails_6.0' | ||
- ruby: '3.0' | ||
rails: 'rails_7.2' | ||
|
||
- ruby: '3.1' | ||
rails: 'rails_5.2' | ||
|
||
- ruby: '3.2' | ||
rails: 'rails_5.2' | ||
|
||
- ruby: '3.3' | ||
rails: 'rails_5.2' | ||
|
||
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps | ||
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.rails }}.gemfile | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
|
||
- name: RSpec | ||
run: 'echo "current_directory: ${PWD}" && bin/rspec --profile 10 --format RspecJunitFormatter --out ./test-results/rspec/results.xml --format progress' | ||
|
||
rspec-integration: | ||
runs-on: ubuntu-latest | ||
|
||
defaults: | ||
run: | ||
working-directory: ${{ github.workspace }}/integration | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ruby: | ||
- '3.3' | ||
- '3.2' | ||
- '3.1' | ||
- '3.0' | ||
- '2.7' | ||
- '2.6' | ||
- '2.5' | ||
rails: | ||
- rails_7.2 | ||
- rails_7.1 | ||
- rails_7.0 | ||
- rails_6.1 | ||
- rails_6.0 | ||
- rails_5.2 | ||
|
||
exclude: | ||
- ruby: '2.5' | ||
rails: 'rails_7.0' | ||
- ruby: '2.5' | ||
rails: 'rails_7.1' | ||
- ruby: '2.5' | ||
rails: 'rails_7.2' | ||
|
||
- ruby: '2.6' | ||
rails: 'rails_7.0' | ||
- ruby: '2.6' | ||
rails: 'rails_7.1' | ||
- ruby: '2.6' | ||
rails: 'rails_7.2' | ||
|
||
- ruby: '2.7' | ||
rails: 'rails_5.2' | ||
- ruby: '2.7' | ||
rails: 'rails_7.2' | ||
|
||
- ruby: '3.0' | ||
rails: 'rails_5.2' | ||
- ruby: '3.0' | ||
rails: 'rails_6.0' | ||
- ruby: '3.0' | ||
rails: 'rails_7.2' | ||
|
||
- ruby: '3.1' | ||
rails: 'rails_5.2' | ||
|
||
- ruby: '3.2' | ||
rails: 'rails_5.2' | ||
|
||
- ruby: '3.3' | ||
rails: 'rails_5.2' | ||
|
||
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps | ||
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.rails }}.gemfile | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
|
||
- name: RSpec | ||
run: 'echo "current_directory: ${PWD}" && bin/rspec --profile 10 --format RspecJunitFormatter --out ./test-results/rspec/results.xml --format progress' |
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 |
---|---|---|
|
@@ -11,3 +11,4 @@ public | |
Gemfile.lock | ||
integration/Gemfile.lock | ||
integration/gemfiles/*.lock | ||
gemfiles/*.lock |
This file was deleted.
Oops, something went wrong.
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,25 @@ | ||
# frozen_string_literal: true | ||
|
||
appraise 'rails_5.2' do | ||
gem 'rails', '~> 5.2.0' | ||
end | ||
|
||
appraise 'rails_6.0' do | ||
gem 'rails', '~> 6.0.0' | ||
end | ||
|
||
appraise 'rails_6.1' do | ||
gem 'rails', '~> 6.1.0' | ||
end | ||
|
||
appraise 'rails_7.0' do | ||
gem 'rails', '~> 7.0.0' | ||
end | ||
|
||
appraise 'rails_7.1' do | ||
gem 'rails', '~> 7.1.0' | ||
end | ||
|
||
appraise 'rails_7.2' do | ||
gem 'rails', '~> 7.2.0' | ||
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
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,27 @@ | ||
#!/usr/bin/env ruby | ||
# frozen_string_literal: true | ||
|
||
# | ||
# This file was generated by Bundler. | ||
# | ||
# The application 'appraisal' is installed as part of a gem, and | ||
# this file is here to facilitate running it. | ||
# | ||
|
||
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) | ||
|
||
bundle_binstub = File.expand_path("bundle", __dir__) | ||
|
||
if File.file?(bundle_binstub) | ||
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") | ||
load(bundle_binstub) | ||
else | ||
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. | ||
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") | ||
end | ||
end | ||
|
||
require "rubygems" | ||
require "bundler/setup" | ||
|
||
load Gem.bin_path("appraisal", "appraisal") |
Oops, something went wrong.