Skip to content

Update all workflows to runs-on: ubuntu-24.04 and Consolidate Capybara Config - #3487

Merged
aaronskiba merged 9 commits into
developmentfrom
aaron/issues/3484
Mar 25, 2025
Merged

Update all workflows to runs-on: ubuntu-24.04 and Consolidate Capybara Config#3487
aaronskiba merged 9 commits into
developmentfrom
aaron/issues/3484

Conversation

@aaronskiba

@aaronskiba aaronskiba commented Mar 17, 2025

Copy link
Copy Markdown
Contributor

Fixes #3484

Changes proposed in this PR:

  • Updates from runs-on: ubuntu-20.04 to runs-on: ubuntu-24.04 within all .github/workflows files

  • Prior to the ubuntu-24.04 update, all of the workflows were bumped to ubuntu-22.04. The 22.04 update resulted in the Danger GitHub Action failing with the following output:

    Run actions/setup-ruby@v1
      with:
        ruby-version: 3.0
      env:
        RUBY_VERSION: 3.0
        BUNDLER_VERSION: [2](https://github.com/DMPRoadmap/roadmap/actions/runs/13906666949/job/38911245234? 
    pr=3487#step:4:2).4
    ------------------------
    NOTE: This action is deprecated and is no longer maintained.
    Please, migrate to https://github.com/ruby/setup-ruby, which is being actively maintained.
    ------------------------
    Error: Version [3](https://github.com/DMPRoadmap/roadmap/actions/runs/13906666949/job/38911245234? 
    pr=3487#step:4:3).0 not found
    
    • To address this, the deprecated actions/setup-ruby@v1 has been replaced with ruby/setup-ruby@v1. Additionally, the regex has been modified to capture the full Ruby and Bundler versions.
  • Bumping the Postgres workflow from runs-on: ubuntu-22.04 to runs-on: ubuntu-22.04 required the following extra steps:

- This change modifies the regex to capture the full versions for Ruby and Bundler.
The following error was being encountered in https://github.com/DMPRoadmap/roadmap/actions/runs/13907418160/job/38913596385?pr=3487:

```
Run actions/setup-ruby@v1
------------------------
NOTE: This action is deprecated and is no longer maintained.
Please, migrate to https://github.com/ruby/setup-ruby, which is being actively maintained.
------------------------
Error: Version 3.0.4 not found
```
aaronskiba and others added 4 commits March 24, 2025 11:00
- `imagemagick` is not pre-installed with `ubuntu-24.04`. However, it is required to resolve the following test failures:

```
Failures:

  1) OrgsController PUT /org/admin/:id/admin_update succeeds for feedback changes
     Failure/Error: return if logo.nil? || logo.height == 100

     Dragonfly::Shell::CommandFailed:
       Command failed: identify -ping -format \%m\ \%w\ \%h /tmp/RackMultipart20250324-4505-2x6nam.png, exit status: 127, error: sh: 1: identify: not found
     # ./app/models/org.rb:357:in `resize_image'
     # ./app/controllers/orgs_controller.rb:81:in `admin_update'
     # ./spec/controllers/orgs_controller_spec.rb:60:in `block (3 levels) in <main>'

  2) OrgsController PUT /org/admin/:id/admin_update updates the shibboleth entityID if super_admin and enabled
     Failure/Error: return if logo.nil? || logo.height == 100

     Dragonfly::Shell::CommandFailed:
       Command failed: identify -ping -format \%m\ \%w\ \%h /tmp/RackMultipart20250324-4505-gp3t74.png, exit status: 127, error: sh: 1: identify: not found
     # ./app/models/org.rb:357:in `resize_image'
     # ./app/controllers/orgs_controller.rb:81:in `admin_update'
     # ./spec/controllers/orgs_controller_spec.rb:73:in `block (3 levels) in <main>'

  3) OrgsController PUT /org/admin/:id/admin_update succeeds
     Failure/Error: return if logo.nil? || logo.height == 100

     Dragonfly::Shell::CommandFailed:
       Command failed: identify -ping -format \%m\ \%w\ \%h /tmp/RackMultipart20250324-4505-42hnxo.png, exit status: 127, error: sh: 1: identify: not found
     # ./app/models/org.rb:357:in `resize_image'
     # ./app/controllers/orgs_controller.rb:81:in `admin_update'
     # ./spec/controllers/orgs_controller_spec.rb:43:in `block (3 levels) in <main>'
```
- Moved the `spec/rails_helper.rb` Capybara config to `spec/support/capybara.rb`
  - Rather than pasting the `Capybara.register_driver :headless_chrome` code, the extra `options.add_argument` code was added to `Capybara.register_driver :selenium_chrome_headless_custom`.

- Renamed `:selenium_chrome_headless_add_window_size` to `:selenium_chrome_headless_custom`
@aaronskiba aaronskiba changed the title Update all workflows to runs-on: ubuntu-22.04 Mar 24, 2025
@aaronskiba aaronskiba changed the title Update all workflows to runs-on: ubuntu-24.04 Mar 24, 2025
@johnpinto1
johnpinto1 self-requested a review March 25, 2025 16:02

@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.

This looks like in does the job for the longer term. I use Linux Mint which uses 22.04, so I don't see any issues with this change locally.

@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.

This looks like some of the changes I made to get the Selenium test to work in one f my PRs. So that is good. I will need to rebase that PR one we have a release.

@aaronskiba
aaronskiba merged commit 141e7cf into development Mar 25, 2025
@aaronskiba
aaronskiba deleted the aaron/issues/3484 branch March 25, 2025 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants