Skip to content

Commit

Permalink
Merge branch 'upstream-release/v4.0.0' into aaron/merge-upstream-rele…
Browse files Browse the repository at this point in the history
…ases-v4.0.0-v4.0.1-v4.0.2
  • Loading branch information
aaronskiba committed Oct 6, 2023
2 parents 348bf30 + c16f001 commit 9421b57
Show file tree
Hide file tree
Showing 179 changed files with 9,248 additions and 3,265 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Install modules
run: yarn
- name: Run ESLint
run: yarn run eslint ./app/javascript/**/*.js
cache: 'yarn'

# Run yarn install for JS dependencies
- name: 'Yarn Install'
run: yarn install

- name: 'Run ESLint'
run: yarn run eslint app/javascript/**/*.js --ext .js
38 changes: 18 additions & 20 deletions .github/workflows/mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ jobs:
# Checkout the repo
- uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: actions/setup-node@v3
ruby-version: 2.7.6
bundler-cache: true

# Install Node
- uses: actions/setup-node@v2
with:
node-version: 16

Expand Down Expand Up @@ -85,31 +88,26 @@ jobs:
yarn install
- name: 'Start MySQL'
run: |
sudo systemctl unmask mysql
sudo systemctl start mysql
run: sudo systemctl start mysql

- name: 'Setup Test DB'
run: bin/rails db:setup RAILS_ENV=test
- name: 'Build out the test database'
run: |
bundle exec rails db:create RAILS_ENV=test
bundle exec rails db:schema:load RAILS_ENV=test
- name: 'Migrate DB'
- name: 'Run any pending database migrations'
run: bin/rails db:migrate RAILS_ENV=test

- name: 'Compile Assets'
run: |
bin/rails webpacker:compile
bin/rails assets:precompile
# Note V3.1.0 DMPTool commented out Karma tests and will move this part to rspec
- name: 'Run Karma Tests'
run: yarn test
# Prebuild the CSS, JS and image assets
- name: 'Precompile all of the Assets'
run: bundle exec rails assets:precompile

- name: 'Run Rspec Unit and Functional Tests'
run: |
bin/bundle exec rspec spec/models/ spec/policies/ spec/services/ spec/helpers/
bin/bundle exec rspec spec/controllers/ spec/presenters/ spec/requests/ spec/views
bin/bundle exec rspec spec/mixins/
bundle exec rspec spec/models/ spec/policies/ spec/services/ spec/helpers/
bundle exec rspec spec/controllers/ spec/presenters/ spec/requests/ spec/views
bundle exec rspec spec/mixins/
# Only run Integration tests if the PR or Push is to master or development branches
- name: 'Run Rspec Integration Tests'
run: bin/bundle exec rspec spec/features/
run: bundle exec rspec spec/features/
29 changes: 13 additions & 16 deletions .github/workflows/postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@ jobs:
# Checkout the repo
- uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: actions/setup-node@v3
ruby-version: 2.7.6
bundler-cache: true

# Install Node
- uses: actions/setup-node@v2
with:
node-version: 16

Expand Down Expand Up @@ -100,25 +103,19 @@ jobs:
yarn install
- name: 'Setup Test DB'
run: bin/rails db:setup RAILS_ENV=test

- name: 'Migrate DB'
run: bin/rails db:migrate RAILS_ENV=test

- name: 'Compile Assets'
run: |
bin/rails webpacker:compile
bin/rails assets:precompile
bundle exec rails db:setup RAILS_ENV=test
bundle exec rails db:migrate RAILS_ENV=test
- name: 'Run Karma Tests'
run: yarn test
- name: 'Compile Assets'
run: bundle exec rails assets:precompile

- name: 'Run Rspec Unit and Functional Tests'
run: |
bin/rspec spec/models/ spec/policies/ spec/services/ spec/helpers/
bin/rspec spec/controllers/ spec/presenters/ spec/requests/ spec/views
bin/rspec spec/mixins/
bundle exec rspec spec/models/ spec/policies/ spec/services/ spec/helpers/
bundle exec rspec spec/controllers/ spec/presenters/ spec/requests/ spec/views
bundle exec rspec spec/mixins/
# Integration Tests are only run if PR or Push is to master or development branches
- name: 'Run Integration Tests'
run: bin/rspec spec/features/
run: bundle exec rspec spec/features/
9 changes: 2 additions & 7 deletions .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,8 @@ jobs:
- name: 'Install Ruby'
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}

- name: 'Bundle Install'
run: |
gem install bundler -v ${{ env.BUNDLER_VERSION }}
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3 --without pgsql rollbar aws
ruby-version: 2.7.6
bundler-cache: true

- name: 'Run Rubocop'
run: bin/rubocop
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,4 @@ yarn-debug.log*
.yarn-integrity

# Ignore staging files in db folder since they can be auto-generated
/db/seeds/staging
/db/seeds/staging
39 changes: 21 additions & 18 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ ruby '>= 2.7.6'
# ===========#

# Full-stack web application framework. (http://rubyonrails.org)
gem 'rails', '~> 5.2'
gem 'rails', '~> 6.1'

# TODO: Remove this once Rails addresses the issue with its dependency on mimemagic. Mimemagic had
# an MIT license but was using some incompatible GPL license code.
# Versions of mimemagic that were yanked: https://rubygems.org/gems/mimemagic/versions
# Analysis of the issue: https://www.theregister.com/2021/03/25/ruby_rails_code/
gem 'mimemagic', '~> 0.3.7'
gem 'mimemagic'

# Use sqlite3 as the database for Active Record
# gem 'sqlite3', '~> 1.4'
Expand All @@ -24,13 +24,17 @@ gem 'mimemagic', '~> 0.3.7'
gem 'puma', group: :puma, require: false

# Use SCSS for stylesheets
# TODO : might need to move to cssbundling-rails
# SEE: https://dev.to/kolide/how-to-migrate-a-rails-6-app-from-sass-rails-to-cssbundling-rails-4l41
gem 'sass-rails'

# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
gem 'webpacker'

# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks'
# Turbo gives you the speed of a single-page web application without having to write any JavaScript..
# Read more: https://github.com/hotwired/turbo-rails
# https://github.com/hotwired/turbo-rails/blob/main/UPGRADING.md
gem 'turbo-rails'

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder'
Expand Down Expand Up @@ -60,6 +64,7 @@ gem 'bootsnap', require: false

# Rollbar-gem is the SDK for Ruby apps and includes support for apps using
# Rails, Sinatra, Rack, plain Ruby, and other frameworks.
# https://github.com/rollbar/rollbar-gem
gem 'rollbar', group: :rollbar, require: false

# ======== #
Expand Down Expand Up @@ -99,6 +104,7 @@ gem 'devise_invitable'
gem 'omniauth'

# OmniAuth Shibboleth strategies for OmniAuth 1.x
# https://github.com/toyokazu/omniauth-shibboleth
gem 'omniauth-shibboleth'

# ORCID OAuth 2.0 Strategy for OmniAuth 1.0
Expand Down Expand Up @@ -154,6 +160,7 @@ gem 'kaminari'

# Paginate in your headers, not in your response body. This follows the
# proposed RFC-8288 standard for Web linking.
# https://github.com/davidcelis/api-pagination
gem 'api-pagination'

# =========== #
Expand All @@ -164,7 +171,7 @@ gem 'api-pagination'
gem 'sassc-rails'

# Font-Awesome SASS (https://github.com/FortAwesome/font-awesome-sass)
gem 'font-awesome-sass', '~> 5.13.0'
gem 'font-awesome-sass', '~> 5'

# Use webpack to manage app-like JavaScript modules in Rails
# (https://github.com/rails/webpacker)
Expand Down Expand Up @@ -194,10 +201,6 @@ gem 'wicked_pdf'
# (http://github.com/karnov/htmltoword)
gem 'htmltoword'

# Filename sanitization for Ruby. This is useful when you generate filenames for
# downloads from user input
gem 'zaru'

# ==================== #
# INTERNATIONALIZATION #
# ==================== #
Expand Down Expand Up @@ -246,11 +249,11 @@ group :development, :test, :sandbox do
# (https://github.com/thekompanee/fuubar)
gem 'fuubar'

# Guard keeps an eye on your file modifications (http://guardgem.org)
# Guard keeps an eye on your file modifications (https://github.com/guard/guard)
gem 'guard'

# Guard gem for RSpec (https://github.com/guard/guard-rspec)
gem 'guard-rspec'
# gem 'guard-rspec'

# Library for stubbing HTTP requests in Ruby.
# (http://github.com/bblimke/webmock)
Expand Down Expand Up @@ -280,11 +283,11 @@ group :development, :test, :sandbox do

# Automatically create snapshots when Cucumber steps fail with Capybara
# and Rails (http://github.com/mattheworiordan/capybara-screenshot)
gem 'capybara-screenshot'
# gem 'capybara-screenshot'

# Browser integration tests are expensive. We can mock external requests
# in our tests, but once a browser is involved, we lose control.
gem 'capybara-webmock', '~> 0.6'
gem 'capybara-webmock'

# RSpec::CollectionMatchers lets you express expected outcomes on
# collections of an object in an example.
Expand Down Expand Up @@ -325,22 +328,22 @@ group :ci, :development do
gem 'rubocop-i18n'

# A collection of RuboCop cops to check for performance optimizations in Ruby code.
gem 'rubocop-performance'
# gem 'rubocop-performance'

# Automatic Rails code style checking tool. A RuboCop extension focused on enforcing
# Rails best practices and coding conventions.
gem 'rubocop-rails'
# gem 'rubocop-rails'

# A RuboCop plugin for Rake tasks
gem 'rubocop-rake'
# gem 'rubocop-rake'

# Code style checking for RSpec files. A plugin for the RuboCop code style enforcing
# & linting tool.
gem 'rubocop-rspec'
# gem 'rubocop-rspec'

# Thread-safety checks via static analysis. A plugin for the RuboCop code style
# enforcing & linting tool.
gem 'rubocop-thread_safety'
# gem 'rubocop-thread_safety'
end

group :development do
Expand Down
Loading

0 comments on commit 9421b57

Please sign in to comment.