-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from andyundso/new-test-suite
Run tests on GitHub Actions
- Loading branch information
Showing
43 changed files
with
335 additions
and
37 deletions.
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,111 @@ | ||
--- | ||
name: CI | ||
on: [push, pull_request] | ||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
# https://www.fastruby.io/blog/ruby/rails/versions/compatibility-table.html | ||
# Rails 4.2 is open ended, but people usually stopped at using it with 2.4 | ||
- ruby: "2.4" | ||
rails: "4_2" | ||
# Rails 5.0 requires 2.2.2 minimum, 2.4.x was maximum | ||
- ruby: "2.4" | ||
rails: "5_0" | ||
# Rails 5.1 requires 2.2.2 minimum, 2.5.x was maximum | ||
- ruby: "2.4" | ||
rails: "5_1" | ||
- ruby: "2.5" | ||
rails: "5_1" | ||
# Rails 5.2 requires 2.2.2 minimum, 2.6.x was maximum | ||
- ruby: "2.4" | ||
rails: "5_2" | ||
- ruby: "2.5" | ||
rails: "5_2" | ||
- ruby: "2.6" | ||
rails: "5_2" | ||
# Rails 6.0 requires 2.5.x minimum, 2.7.x was maximum | ||
- ruby: "2.5" | ||
rails: "6_0" | ||
- ruby: "2.6" | ||
rails: "6_0" | ||
- ruby: "2.7" | ||
rails: "6_0" | ||
# Rails 6.1 requires 2.5.x minimum and is open ended | ||
- ruby: "2.5" | ||
rails: "6_1" | ||
- ruby: "2.6" | ||
rails: "6_1" | ||
- ruby: "2.7" | ||
rails: "6_1" | ||
- ruby: "3.0" | ||
rails: "6_1" | ||
- ruby: "3.1" | ||
rails: "6_1" | ||
- ruby: "3.2" | ||
rails: "6_1" | ||
# Rails 7.0 requires 2.7.x minimum and is open ended | ||
- ruby: "2.7" | ||
rails: "7_0" | ||
- ruby: "3.0" | ||
rails: "7_0" | ||
- ruby: "3.1" | ||
rails: "7_0" | ||
- ruby: "3.2" | ||
rails: "7_0" | ||
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps | ||
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_${{ matrix.rails }}.gemfile | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler: ${{ matrix.rails == '4_2' && '1.17.3' || 'default' }} | ||
bundler-cache: true | ||
|
||
- name: Run tests | ||
run: bundle exec rspec | ||
|
||
- name: Archive code coverage results | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: code-coverage-report | ||
path: coverage/coverage.json | ||
|
||
rubocop: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.2 | ||
bundler-cache: true | ||
|
||
- name: Run Rubocop | ||
run: bundle exec rubocop | ||
|
||
upload-coverage: | ||
needs: tests | ||
runs-on: ubuntu-latest | ||
if: ${{ github.repository == 'jejacks0n/navigasmic' }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Download code coverage artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: code-coverage-report | ||
|
||
- name: Test & publish code coverage | ||
uses: paambaati/[email protected] | ||
env: | ||
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}} | ||
with: | ||
coverageLocations: ${{github.workspace}}/coverage.json:simplecov |
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,3 +4,5 @@ coverage | |
spec/dummy/log/*.log | ||
spec/dummy/tmp/ | ||
Gemfile.lock | ||
*.gemfile.lock | ||
*.sqlite |
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 +1 @@ | ||
2.5.1 | ||
2.7.8 |
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,48 @@ | ||
appraise "rails-4-2" do | ||
gem "rails", "~> 4.2.0" | ||
|
||
# https://github.com/flavorjones/loofah/pull/267 | ||
gem "loofah", "<= 2.20.0" | ||
|
||
# Ensure we do not use the precompiled gem, which has Ruby >= 2.7 as a requirement | ||
gem "sqlite3", "< 1.5.0" | ||
end | ||
|
||
appraise "rails-5-0" do | ||
gem "rails", "~> 5.0.0" | ||
|
||
# https://github.com/flavorjones/loofah/pull/267 | ||
gem "loofah", "<= 2.20.0" | ||
|
||
# Ensure we do not use the precompiled gem, which has Ruby >= 2.7 as a requirement | ||
gem "sqlite3", "< 1.5.0" | ||
end | ||
|
||
appraise "rails-5-1" do | ||
gem "rails", "~> 5.1.0" | ||
|
||
# https://github.com/flavorjones/loofah/pull/267 | ||
gem "loofah", "<= 2.20.0" | ||
|
||
# Ensure we do not use the precompiled gem, which has Ruby >= 2.7 as a requirement | ||
gem "sqlite3", "< 1.5.0" | ||
end | ||
|
||
appraise "rails-5-2" do | ||
gem "rails", "~> 5.2.0" | ||
|
||
# https://github.com/flavorjones/loofah/pull/267 | ||
gem "loofah", "<= 2.20.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 |
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
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,17 @@ | ||
# This file was generated by Appraisal | ||
|
||
source "https://rubygems.org" | ||
|
||
gem "rubocop", require: false | ||
gem "rubocop-rails_config" | ||
gem "rails", "~> 4.2.0" | ||
gem "loofah", "<= 2.20.0" | ||
gem "sqlite3", "< 1.5.0" | ||
|
||
group :test do | ||
gem "rspec-rails" | ||
gem "simplecov" | ||
gem "simplecov_json_formatter" | ||
end | ||
|
||
gemspec path: "../" |
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,17 @@ | ||
# This file was generated by Appraisal | ||
|
||
source "https://rubygems.org" | ||
|
||
gem "rubocop", require: false | ||
gem "rubocop-rails_config" | ||
gem "rails", "~> 5.0.0" | ||
gem "loofah", "<= 2.20.0" | ||
gem "sqlite3", "< 1.5.0" | ||
|
||
group :test do | ||
gem "rspec-rails" | ||
gem "simplecov" | ||
gem "simplecov_json_formatter" | ||
end | ||
|
||
gemspec path: "../" |
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,17 @@ | ||
# This file was generated by Appraisal | ||
|
||
source "https://rubygems.org" | ||
|
||
gem "rubocop", require: false | ||
gem "rubocop-rails_config" | ||
gem "rails", "~> 5.1.0" | ||
gem "loofah", "<= 2.20.0" | ||
gem "sqlite3", "< 1.5.0" | ||
|
||
group :test do | ||
gem "rspec-rails" | ||
gem "simplecov" | ||
gem "simplecov_json_formatter" | ||
end | ||
|
||
gemspec path: "../" |
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,16 @@ | ||
# This file was generated by Appraisal | ||
|
||
source "https://rubygems.org" | ||
|
||
gem "rubocop", require: false | ||
gem "rubocop-rails_config" | ||
gem "rails", "~> 5.2.0" | ||
gem "loofah", "<= 2.20.0" | ||
|
||
group :test do | ||
gem "rspec-rails" | ||
gem "simplecov" | ||
gem "simplecov_json_formatter" | ||
end | ||
|
||
gemspec path: "../" |
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,15 @@ | ||
# This file was generated by Appraisal | ||
|
||
source "https://rubygems.org" | ||
|
||
gem "rubocop", require: false | ||
gem "rubocop-rails_config" | ||
gem "rails", "~> 6.0.0" | ||
|
||
group :test do | ||
gem "rspec-rails" | ||
gem "simplecov" | ||
gem "simplecov_json_formatter" | ||
end | ||
|
||
gemspec path: "../" |
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,15 @@ | ||
# This file was generated by Appraisal | ||
|
||
source "https://rubygems.org" | ||
|
||
gem "rubocop", require: false | ||
gem "rubocop-rails_config" | ||
gem "rails", "~> 6.1.0" | ||
|
||
group :test do | ||
gem "rspec-rails" | ||
gem "simplecov" | ||
gem "simplecov_json_formatter" | ||
end | ||
|
||
gemspec path: "../" |
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,15 @@ | ||
# This file was generated by Appraisal | ||
|
||
source "https://rubygems.org" | ||
|
||
gem "rubocop", require: false | ||
gem "rubocop-rails_config" | ||
gem "rails", "~> 7.0.0" | ||
|
||
group :test do | ||
gem "rspec-rails" | ||
gem "simplecov" | ||
gem "simplecov_json_formatter" | ||
end | ||
|
||
gemspec path: "../" |
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
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
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
Empty file.
Oops, something went wrong.