Skip to content
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

Dpl680 version rails 6 0 minor changes #3906

Closed
wants to merge 45 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
4d79a0a
Merge pull request #3891 from sanger/develop
emrojo Aug 21, 2023
64b95fa
Updated ruby version
emrojo Sep 27, 2023
f3efe79
Updated capybara and selenium-webdrivers
emrojo Sep 27, 2023
d2bc6f6
Update dynamic form
emrojo Sep 27, 2023
290027f
Remove dynamic_form
emrojo Sep 27, 2023
d33172b
Fix splat operator
emrojo Sep 27, 2023
843134c
In PlateVolume, calculate_barcode_from_filename is moved to before_va…
emrojo Oct 3, 2023
ad1f7be
Heron factory new message format updated
emrojo Oct 3, 2023
d2097f2
Fix full_messages from error object in specialized_field manifest
emrojo Oct 3, 2023
540f04a
Fixed full_messages for Heron factories
emrojo Oct 3, 2023
bf3dd0c
Fix error messages request heron
emrojo Oct 3, 2023
1957364
FormView does not delegate errors to the attached instance model
emrojo Oct 3, 2023
c8802d9
Fix on message display
emrojo Oct 3, 2023
390611c
Applied rubocop but ignored any new cops.
emrojo Oct 3, 2023
7c22353
Applied prettier
emrojo Oct 3, 2023
13b13dc
Solving minor issues
emrojo Oct 3, 2023
fa0c706
Update on slow test
emrojo Oct 6, 2023
9fd4589
Changes for minitests
emrojo Oct 6, 2023
3eabe8d
Linting
emrojo Oct 6, 2023
42c08bb
Merge branch 'master' of https://github.com/sanger/sequencescape into…
emrojo Oct 6, 2023
1bbe0f7
Update knapsack_pro env
emrojo Oct 6, 2023
84ff928
Merge branch 'develop' of https://github.com/sanger/sequencescape int…
emrojo Oct 6, 2023
0931192
Setup RAILS_ENV for cucumber as cucumber
emrojo Oct 6, 2023
dc6cd11
Try to enforce cucumber env for cucumber
emrojo Oct 6, 2023
df08bd5
Merge branch 'develop' of https://github.com/sanger/sequencescape int…
emrojo Oct 12, 2023
6cbd617
Change on database.yaml to load database name for cucumber
emrojo Oct 12, 2023
0878f32
cucumber rails env for cucumber
emrojo Oct 12, 2023
bd3d4e8
Move to use test database, as it seems they've enforced RAILS_ENV=test
emrojo Oct 12, 2023
1f7283a
Update to run cucumber in test env
emrojo Oct 12, 2023
ebaf1b3
Prettier
emrojo Oct 12, 2023
86e4d01
Validateable keyword fix
emrojo Oct 17, 2023
cce7cf9
Keyword fix study report
emrojo Oct 17, 2023
6b47e23
Updated carrierwave
emrojo Oct 17, 2023
bf3c3c3
Linting
emrojo Oct 17, 2023
ce82b0e
Rollback
emrojo Oct 18, 2023
416d53f
More changes
emrojo Oct 18, 2023
5fafd33
Redefine URI.unescape (deprecated in ruby 3, but still needed by
emrojo Oct 18, 2023
10ffd69
cucumber rails env in github
emrojo Oct 18, 2023
cea0348
URI.unescape definition (deprecated ruby 3)
emrojo Oct 18, 2023
758e807
Run seeds in cucumber
emrojo Oct 18, 2023
38c1f1f
Seed database before starting test
emrojo Oct 19, 2023
581b11a
Try to seed test
emrojo Oct 19, 2023
fb5c218
Seed database
emrojo Oct 19, 2023
3b9112f
Seed database
emrojo Oct 19, 2023
30bbea0
Reset and seed
emrojo Oct 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 10 additions & 1 deletion .github/workflows/ruby_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ jobs:
env:
CI_NODE_TOTAL: ${{ matrix.ci_node_total }}
CI_NODE_INDEX: ${{ matrix.ci_node_index }}
KNAPSACK_PRO_CI_NODE_TOTAL: ${{ matrix.ci_node_total }}
KNAPSACK_PRO_CI_NODE_INDEX: ${{ matrix.ci_node_index }}
DBPORT: ${{ job.services.mysql.ports[3306] }}
run: bin/knapsack_pro_rspec
- name: Upload capybara artifacts
Expand All @@ -135,7 +137,7 @@ jobs:
cucumber_tests:
runs-on: ubuntu-latest
env:
RAILS_ENV: cucumber
RAILS_ENV: test
BUNDLE_WITHOUT: "deployment profile development test"
# Services
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#jobsjob_idservices
Expand Down Expand Up @@ -178,12 +180,19 @@ jobs:
run: |
bin/setup
bundle exec rake assets:precompile
echo "Reset database database cucumber"
RAILS_ENV=cucumber bundle exec rake db:reset
echo "Seed database"
RAILS_ENV=cucumber bundle exec rake db:seed
# Actually run our tests
- name: Run Cucumber tests
env:
CI_NODE_TOTAL: ${{ matrix.ci_node_total }}
CI_NODE_INDEX: ${{ matrix.ci_node_index }}
KNAPSACK_PRO_CI_NODE_TOTAL: ${{ matrix.ci_node_total }}
KNAPSACK_PRO_CI_NODE_INDEX: ${{ matrix.ci_node_index }}
DBPORT: ${{ job.services.mysql.ports[3306] }}
RAILS_ENV: cucumber
run: bin/knapsack_pro_cucumber
- name: Upload capybara artifacts
uses: actions/upload-artifact@v2
Expand Down
34 changes: 30 additions & 4 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ Rails/SkipsModelValidations:
- "features/support/step_definitions/*.rb"

Style/Documentation:
Exclude:
- "test/**/*"
- "spec/**/*"
Enabled: false
#Exclude:
# - "test/**/*"
# - "spec/**/*"

Rails:
Enabled: true
Expand Down Expand Up @@ -176,7 +177,7 @@ Rails/UniqueValidationWithoutIndex:
Enabled: false

# Disabling newly introduced cops until we have time to sort out the offenses
RSpec/FactoryBot/ConsistentParenthesesStyle:
FactoryBot/ConsistentParenthesesStyle:
Enabled: false

Rails/I18nLocaleTexts: # new in 2.14
Expand All @@ -193,3 +194,28 @@ Rails/ActionControllerTestCase: # new in 2.14

RSpec/NoExpectationExample: # new in 2.13
Enabled: false

# New in ruby 3 upgrade
RSpec/IndexedLet:
Enabled: false

RSpec/SpecFilePathFormat:
Enabled: false

RSpec/PendingWithoutReason:
Enabled: false

Capybara/ClickLinkOrButtonStyle:
Enabled: false

FactoryBot/FactoryAssociationWithStrategy:
Enabled: false

Performance/MapMethodChain:
Enabled: false

Rails/ThreeStateBooleanColumn:
Enabled: false

RSpec/ExpectInHook:
Enabled: false
6 changes: 6 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,7 @@ RSpec/ContextWording:
- 'spec/shared_contexts/limber_shared_context.rb'
- 'spec/uat_actions/integration_suite_tools_spec.rb'
- 'spec/uat_actions/test_submission_spec.rb'
- 'spec/features/gpl207_bug_incorrect_submission_id_on_transfer_spec.rb'

# Offense count: 4
RSpec/EmptyExampleGroup:
Expand Down Expand Up @@ -1860,3 +1861,8 @@ Style/ZeroLengthPredicate:
- 'app/models/sequencing_pipeline.rb'
- 'features/support/step_definitions/samples_steps.rb'
- 'test/shoulda_macros/sanger_macros/resource_test.rb'

Metrics/ClassLength:
Exclude:
- 'app/middleware/api/endpoint_handler.rb'
- 'lib/tasks/add_templates_and_printers_to_pmb.rake'
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.8
3.0.6
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ARG CHIPSET=default

# Use the correct base image depending on the architecture
# For Apple M1 Chip, run: docker build --build-arg CHIPSET=m1
FROM ruby:2.7.8-slim AS base_default
FROM ruby:3.0.6-slim AS base_default
FROM --platform=linux/amd64 ruby:2.7.8-slim AS base_m1
FROM base_${CHIPSET} AS base

Expand Down Expand Up @@ -45,6 +45,7 @@ ADD . /code/

# Install Chrome for being able to run tests
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
RUN apt update
RUN apt install -y ./google-chrome-stable_current_amd64.deb
RUN rm ./google-chrome-stable_current_amd64.deb

Expand Down
6 changes: 2 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ group :default do

# Provides bulk insert capabilities
gem 'activerecord-import'
gem 'record_loader'
gem 'record_loader', git: 'https://github.com/sanger/record_loader', branch: 'dpl680_upgrade_ruby3'

gem 'mysql2', platforms: :mri
gem 'will_paginate'
Expand All @@ -40,7 +40,7 @@ group :default do
gem 'will_paginate-bootstrap'

# Provides eg. error_messages_for previously in rails 2, now deprecated.
gem 'dynamic_form'
#gem 'dynamic_form'

gem 'daemons'
gem 'puma'
Expand Down Expand Up @@ -186,9 +186,7 @@ group :test, :cucumber do
gem 'shoulda'
gem 'simplecov', require: false
gem 'timecop', require: false
end

group :cucumber do
gem 'cucumber_github_formatter'
gem 'cucumber-rails', require: false
end
Expand Down
Loading
Loading