Skip to content

Fix MySQL and PostgreSQL GitHub Actions - #3376

Merged
martaribeiro merged 6 commits into
developmentfrom
aaron/fix-rspec-tests
Mar 25, 2024
Merged

Fix MySQL and PostgreSQL GitHub Actions#3376
martaribeiro merged 6 commits into
developmentfrom
aaron/fix-rspec-tests

Conversation

@aaronskiba

Copy link
Copy Markdown
Contributor

Fixes #3347

Changes proposed in this PR:

  • Replace webdrivers gem with selenium-webdriver gem (https://github.com/titusfortner/webdrivers states "If you can update to the latest version of Selenium (4.11+), please do so and stop requiring this gem.")
  • Disable rack-attack from throttling "/users/sign_in" path on Rails test environment
  • Address Faker deprecation warning NOTE: Faker::Internet.safe_email is deprecated; use email instead. It will be removed on or after 2023-10. (More here: Generate safe email and domain_name by default (RFC 2606) faker-ruby/faker#2733)
  • Small changes to enable existing tests to pass (here: a5710ad)
  • Fix mysql.yml and postgres.yml workflows by removing duplicate node-version: statements
According to https://github.com/titusfortner/webdrivers:
"If you can update to the latest version of Selenium (4.11+), please do so and stop requiring this gem."
Without this modification, the selenium tests often trigger a 429 / Too Many Requests error. (Perhaps this should be applied to "/users/password" as well?)
Prior to this commit, the following deprecation warning was appearing in the terminal:
NOTE: Faker::Internet.safe_email is deprecated; use email instead. It will be removed on or after 2023-10.

More here: faker-ruby/faker#2733
Prior to this commit, the GitHub Actions associated with these files were failing with the message, "Invalid workflow file
The workflow is not valid. .github/workflows/mysql.yml (Line: X, Col: Y): 'node-version' is already defined"
@johnpinto1

Copy link
Copy Markdown
Contributor

Looks good. Updating webdriver and getting rid of issues with Github Actions.

NOTE: Additional Rubocop offences currently exist in the codebase. These fixes only address the PR changes that correspond with this commit.

@johnpinto1 johnpinto1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Like rack-attack disabling for tests.

@martaribeiro
martaribeiro merged commit 6ec87f5 into development Mar 25, 2024
@martaribeiro
martaribeiro deleted the aaron/fix-rspec-tests branch March 25, 2024 16:32
aaronskiba added a commit that referenced this pull request Mar 26, 2024
aaronskiba added a commit that referenced this pull request Mar 26, 2024
aaronskiba added a commit that referenced this pull request Apr 8, 2024
@benjaminfaure benjaminfaure mentioned this pull request Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants