From 7f5261ba0f5178e1032a72400c09cf0e04e5f268 Mon Sep 17 00:00:00 2001 From: Nayan Taori <64462883+NDT2000@users.noreply.github.com> Date: Fri, 3 Oct 2025 15:14:12 -0400 Subject: [PATCH 01/21] Update TestPR.yml Updated the Ruby version to 3.4.5 --- .github/workflows/TestPR.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/TestPR.yml b/.github/workflows/TestPR.yml index 93a5970a6..bb893e28b 100644 --- a/.github/workflows/TestPR.yml +++ b/.github/workflows/TestPR.yml @@ -29,7 +29,7 @@ jobs: - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 3.2.7 + ruby-version: 3.4.5 bundler-cache: true - name: Setup Node.js From bef8a5194ac75643e69228c5c56cb88313bbc679 Mon Sep 17 00:00:00 2001 From: Nayan Taori <64462883+NDT2000@users.noreply.github.com> Date: Fri, 3 Oct 2025 15:16:20 -0400 Subject: [PATCH 02/21] Update danger.yml --- .github/workflows/danger.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml index 728ae334a..2e9b82bd6 100644 --- a/.github/workflows/danger.yml +++ b/.github/workflows/danger.yml @@ -15,7 +15,7 @@ jobs: - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: '3.2.7' + ruby-version: '3.4.5' - name: Install dependencies run: bundle install @@ -23,4 +23,4 @@ jobs: - name: Run Danger env: DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: bundle exec danger --verbose \ No newline at end of file + run: bundle exec danger --verbose From f9e73eafe621ca3d3a91278ea6ae411223f2495c Mon Sep 17 00:00:00 2001 From: Nayan Taori <64462883+NDT2000@users.noreply.github.com> Date: Fri, 3 Oct 2025 15:17:00 -0400 Subject: [PATCH 03/21] Ruby version updated --- .github/workflows/danger_target.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/danger_target.yml b/.github/workflows/danger_target.yml index 00da8ffb8..4833bc4c2 100644 --- a/.github/workflows/danger_target.yml +++ b/.github/workflows/danger_target.yml @@ -17,7 +17,7 @@ jobs: - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: '3.2.7' + ruby-version: '3.4.5' - name: Install dependencies run: bundle install @@ -26,4 +26,4 @@ jobs: - name: Run Danger env: DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: bundle exec danger --verbose \ No newline at end of file + run: bundle exec danger --verbose From 2ee619620768449c6224a0ef0561db9c779c2923 Mon Sep 17 00:00:00 2001 From: Nayan Taori <64462883+NDT2000@users.noreply.github.com> Date: Fri, 3 Oct 2025 15:17:36 -0400 Subject: [PATCH 04/21] Ruby version updated --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 15843d3f9..14c8d1048 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,7 +30,7 @@ jobs: - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 3.2.7 + ruby-version: 3.4.5 bundler-cache: true - name: Setup Node.js From 9a8554f91fa74128260e3d2c5f92f572c0534fef Mon Sep 17 00:00:00 2001 From: NDT2000 Date: Fri, 3 Oct 2025 15:41:27 -0400 Subject: [PATCH 05/21] Ruby version update --- .ruby-version | 2 +- Dockerfile | 2 +- Gemfile | 2 +- Gemfile.lock | 10 +++++----- README.md | 2 +- docker-compose.yml | 2 -- 6 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.ruby-version b/.ruby-version index aa6fd8a3d..df9407bbb 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -ruby-3.2.7 \ No newline at end of file +ruby-3.4.5 \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index e89a49ee8..ff57d5dd5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.2.7 +FROM ruby:3.4.5 LABEL maintainer="Ankur Mundra " # Install dependencies diff --git a/Gemfile b/Gemfile index 4f4ae9434..d72297e67 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } -ruby '3.2.7' +ruby '3.4.5' gem 'mysql2', '~> 0.5.5' gem 'puma', '~> 5.0' diff --git a/Gemfile.lock b/Gemfile.lock index a901506e0..cf95aea78 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -209,13 +209,13 @@ GEM net-protocol netrc (0.11.0) nio4r (2.5.9) - nokogiri (1.15.2-aarch64-linux) + nokogiri (1.18.10-aarch64-linux-gnu) racc (~> 1.4) - nokogiri (1.15.2-arm64-darwin) + nokogiri (1.18.10-arm64-darwin) racc (~> 1.4) - nokogiri (1.15.2-x64-mingw-ucrt) + nokogiri (1.18.10-x64-mingw-ucrt) racc (~> 1.4) - nokogiri (1.15.2-x86_64-linux) + nokogiri (1.18.10-x86_64-linux-gnu) racc (~> 1.4) octokit (10.0.0) faraday (>= 1, < 3) @@ -405,7 +405,7 @@ DEPENDENCIES tzinfo-data RUBY VERSION - ruby 3.2.7p253 + ruby 3.4.5p0 BUNDLED WITH 2.4.14 diff --git a/README.md b/README.md index 035aee277..2c94a747a 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ application up and running. Things you may want to cover: -* Ruby version - 3.2.1 +* Ruby version - 3.4.5 ## Development Environment diff --git a/docker-compose.yml b/docker-compose.yml index 85edfda55..f22dc27ef 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: '3.1' - services: app: build: . From bfc438ec9e2f7ab469f9942bc5c6ff58fe9f1c95 Mon Sep 17 00:00:00 2001 From: NDT2000 Date: Fri, 3 Oct 2025 15:50:33 -0400 Subject: [PATCH 06/21] Solution for failing tests --- .github/workflows/danger.yml | 6 +++++- .github/workflows/danger_target.yml | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml index 2e9b82bd6..7bf51a8a0 100644 --- a/.github/workflows/danger.yml +++ b/.github/workflows/danger.yml @@ -16,9 +16,13 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: '3.4.5' + bundler-cache: false - name: Install dependencies - run: bundle install + run: | + gem update --system + gem install bundler:2.4.7 + bundle install - name: Run Danger env: diff --git a/.github/workflows/danger_target.yml b/.github/workflows/danger_target.yml index 4833bc4c2..baf8f53fa 100644 --- a/.github/workflows/danger_target.yml +++ b/.github/workflows/danger_target.yml @@ -18,9 +18,13 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: '3.4.5' + bundler-cache: false - name: Install dependencies - run: bundle install + run: | + gem update --system + gem install bundler:2.4.7 + bundle install - name: Run Danger From cdafe1e042a332ca3b637e5fd04fa08b7a882e9e Mon Sep 17 00:00:00 2001 From: NDT2000 Date: Fri, 3 Oct 2025 15:55:54 -0400 Subject: [PATCH 07/21] Solution for failing tests --- .github/workflows/TestPR.yml | 7 ++++++- .github/workflows/danger.yml | 3 +++ .github/workflows/danger_target.yml | 3 +++ .github/workflows/main.yml | 7 ++++++- 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/TestPR.yml b/.github/workflows/TestPR.yml index bb893e28b..1c43eddda 100644 --- a/.github/workflows/TestPR.yml +++ b/.github/workflows/TestPR.yml @@ -30,7 +30,10 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: 3.4.5 - bundler-cache: true + bundler-cache: false + + - name: Check Ruby Version + run: ruby -v - name: Setup Node.js uses: actions/setup-node@v3 @@ -45,6 +48,8 @@ jobs: run: | gem update --system gem install bundler:2.4.7 + bundle config set --local deployment 'false' + bundle config set --local without '' bundle install - name: Setup database run: | diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml index 7bf51a8a0..93e7efc22 100644 --- a/.github/workflows/danger.yml +++ b/.github/workflows/danger.yml @@ -18,6 +18,9 @@ jobs: ruby-version: '3.4.5' bundler-cache: false + - name: Check Ruby Version + run: ruby -v + - name: Install dependencies run: | gem update --system diff --git a/.github/workflows/danger_target.yml b/.github/workflows/danger_target.yml index baf8f53fa..420690add 100644 --- a/.github/workflows/danger_target.yml +++ b/.github/workflows/danger_target.yml @@ -20,6 +20,9 @@ jobs: ruby-version: '3.4.5' bundler-cache: false + - name: Check Ruby Version + run: ruby -v + - name: Install dependencies run: | gem update --system diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 14c8d1048..d9436dbea 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,7 +31,10 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: 3.4.5 - bundler-cache: true + bundler-cache: false + + - name: Check Ruby Version + run: ruby -v - name: Setup Node.js uses: actions/setup-node@v3 @@ -47,6 +50,8 @@ jobs: run: | gem update --system gem install bundler:2.4.7 + bundle config set --local deployment 'false' + bundle config set --local without '' bundle install - name: Setup database From 5bb4911b1843025f94273f884701569cdb7c8f52 Mon Sep 17 00:00:00 2001 From: NDT2000 Date: Fri, 3 Oct 2025 16:02:33 -0400 Subject: [PATCH 08/21] Solution for failing CI/CD tests --- .github/workflows/TestPR.yml | 3 ++- .github/workflows/main.yml | 3 ++- Gemfile | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/TestPR.yml b/.github/workflows/TestPR.yml index 1c43eddda..6de05a761 100644 --- a/.github/workflows/TestPR.yml +++ b/.github/workflows/TestPR.yml @@ -50,7 +50,8 @@ jobs: gem install bundler:2.4.7 bundle config set --local deployment 'false' bundle config set --local without '' - bundle install + bundle config set --local force_ruby_platform true + bundle install --verbose - name: Setup database run: | bundle exec rails db:create RAILS_ENV=test diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d9436dbea..c8a408e0b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -52,7 +52,8 @@ jobs: gem install bundler:2.4.7 bundle config set --local deployment 'false' bundle config set --local without '' - bundle install + bundle config set --local force_ruby_platform true + bundle install --verbose - name: Setup database run: | diff --git a/Gemfile b/Gemfile index d72297e67..a9ffeb82b 100644 --- a/Gemfile +++ b/Gemfile @@ -6,9 +6,11 @@ ruby '3.4.5' gem 'mysql2', '~> 0.5.5' gem 'puma', '~> 5.0' gem 'rails', '~> 8.0', '>= 8.0.1' +gem 'observer' # Required for Ruby 3.4.5 compatibility with Rails 8.0 gem 'rswag-api' gem 'rswag-ui' gem 'active_model_serializers', '~> 0.10.0' +gem 'psych', '~> 5.2' # Ensure compatible psych version for Ruby 3.4.5 # Build JSON APIs with ease [https://github.com/rails/jbuilder] # gem "jbuilder" From b6876e67c69621b610bc6b360579077ff767501b Mon Sep 17 00:00:00 2001 From: NDT2000 Date: Fri, 3 Oct 2025 16:07:35 -0400 Subject: [PATCH 09/21] Solution for failing CI/CD tests --- Gemfile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Gemfile b/Gemfile index a9ffeb82b..2b5d0894f 100644 --- a/Gemfile +++ b/Gemfile @@ -7,6 +7,20 @@ gem 'mysql2', '~> 0.5.5' gem 'puma', '~> 5.0' gem 'rails', '~> 8.0', '>= 8.0.1' gem 'observer' # Required for Ruby 3.4.5 compatibility with Rails 8.0 +gem 'mutex_m' # Required for Ruby 3.4.5 compatibility +gem 'faraday-retry' # Required for Faraday v2.0+ compatibility +gem 'bigdecimal' # Required for Ruby 3.4.5 compatibility +gem 'csv' # Required for Ruby 3.4.5 compatibility +gem 'date' # Required for Ruby 3.4.5 compatibility +gem 'delegate' # Required for Ruby 3.4.5 compatibility +gem 'forwardable' # Required for Ruby 3.4.5 compatibility +gem 'logger' # Required for Ruby 3.4.5 compatibility +gem 'monitor' # Required for Ruby 3.4.5 compatibility +gem 'ostruct' # Required for Ruby 3.4.5 compatibility +gem 'set' # Required for Ruby 3.4.5 compatibility +gem 'singleton' # Required for Ruby 3.4.5 compatibility +gem 'timeout' # Required for Ruby 3.4.5 compatibility +gem 'uri' # Required for Ruby 3.4.5 compatibility gem 'rswag-api' gem 'rswag-ui' gem 'active_model_serializers', '~> 0.10.0' From c941369cf23514d232b7bb915872549e1800688d Mon Sep 17 00:00:00 2001 From: NDT2000 Date: Fri, 3 Oct 2025 16:14:06 -0400 Subject: [PATCH 10/21] Solution for failing CI/CD tests --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c8a408e0b..2339024fc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -62,7 +62,7 @@ jobs: - name: Set up code climate test-reporter run: | - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter + curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 -o ./cc-test-reporter chmod +x ./cc-test-reporter ./cc-test-reporter before-build @@ -97,7 +97,7 @@ jobs: - name: Upload code-coverage report to code-climate run: | export GIT_BRANCH="${GITHUB_REF/refs\/heads\//}" - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter + curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 -o ./cc-test-reporter chmod +x ./cc-test-reporter ./cc-test-reporter sum-coverage coverage/codeclimate.*.json ./cc-test-reporter after-build -t simplecov -r ${{ secrets.CC_TEST_REPORTER_ID }} From 049eaef651d58c81c0f9a69e71dc3fd25e6187f9 Mon Sep 17 00:00:00 2001 From: NDT2000 Date: Fri, 3 Oct 2025 16:20:29 -0400 Subject: [PATCH 11/21] Solution for failing CI/CD tests --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2339024fc..092f24fc6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -62,7 +62,7 @@ jobs: - name: Set up code climate test-reporter run: | - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 -o ./cc-test-reporter + curl -sL https://github.com/codeclimate/test-reporter/releases/latest/download/cc-test-reporter-linux-amd64 -o ./cc-test-reporter chmod +x ./cc-test-reporter ./cc-test-reporter before-build @@ -97,7 +97,7 @@ jobs: - name: Upload code-coverage report to code-climate run: | export GIT_BRANCH="${GITHUB_REF/refs\/heads\//}" - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 -o ./cc-test-reporter + curl -sL https://github.com/codeclimate/test-reporter/releases/latest/download/cc-test-reporter-linux-amd64 -o ./cc-test-reporter chmod +x ./cc-test-reporter ./cc-test-reporter sum-coverage coverage/codeclimate.*.json ./cc-test-reporter after-build -t simplecov -r ${{ secrets.CC_TEST_REPORTER_ID }} From 643a47ac4de34d447a8ec6fcfa5c71fd58ca9c49 Mon Sep 17 00:00:00 2001 From: NDT2000 Date: Fri, 3 Oct 2025 16:24:22 -0400 Subject: [PATCH 12/21] Solution for failing CI/CD tests --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 092f24fc6..b430799c9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -62,7 +62,7 @@ jobs: - name: Set up code climate test-reporter run: | - curl -sL https://github.com/codeclimate/test-reporter/releases/latest/download/cc-test-reporter-linux-amd64 -o ./cc-test-reporter + wget -qO ./cc-test-reporter https://github.com/codeclimate/test-reporter/releases/download/0.10.4/cc-test-reporter-linux-amd64 chmod +x ./cc-test-reporter ./cc-test-reporter before-build @@ -97,7 +97,7 @@ jobs: - name: Upload code-coverage report to code-climate run: | export GIT_BRANCH="${GITHUB_REF/refs\/heads\//}" - curl -sL https://github.com/codeclimate/test-reporter/releases/latest/download/cc-test-reporter-linux-amd64 -o ./cc-test-reporter + wget -qO ./cc-test-reporter https://github.com/codeclimate/test-reporter/releases/download/0.10.4/cc-test-reporter-linux-amd64 chmod +x ./cc-test-reporter ./cc-test-reporter sum-coverage coverage/codeclimate.*.json ./cc-test-reporter after-build -t simplecov -r ${{ secrets.CC_TEST_REPORTER_ID }} From d2c12d66c143bb925c71be281030f10cab5dd399 Mon Sep 17 00:00:00 2001 From: NDT2000 Date: Fri, 3 Oct 2025 16:28:09 -0400 Subject: [PATCH 13/21] Solution for failing CI/CD tests --- .github/workflows/main.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b430799c9..b552cf071 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -62,9 +62,8 @@ jobs: - name: Set up code climate test-reporter run: | - wget -qO ./cc-test-reporter https://github.com/codeclimate/test-reporter/releases/download/0.10.4/cc-test-reporter-linux-amd64 - chmod +x ./cc-test-reporter - ./cc-test-reporter before-build + gem install codeclimate-test-reporter + cc-test-reporter before-build - name: Run model tests run: bundle exec rspec spec/models @@ -97,10 +96,9 @@ jobs: - name: Upload code-coverage report to code-climate run: | export GIT_BRANCH="${GITHUB_REF/refs\/heads\//}" - wget -qO ./cc-test-reporter https://github.com/codeclimate/test-reporter/releases/download/0.10.4/cc-test-reporter-linux-amd64 - chmod +x ./cc-test-reporter - ./cc-test-reporter sum-coverage coverage/codeclimate.*.json - ./cc-test-reporter after-build -t simplecov -r ${{ secrets.CC_TEST_REPORTER_ID }} + gem install codeclimate-test-reporter + cc-test-reporter sum-coverage coverage/codeclimate.*.json + cc-test-reporter after-build -t simplecov -r ${{ secrets.CC_TEST_REPORTER_ID }} docker: needs: test From e9d01ceeb066c693b247806d00ca202947b472be Mon Sep 17 00:00:00 2001 From: NDT2000 Date: Mon, 6 Oct 2025 04:26:50 -0400 Subject: [PATCH 14/21] Pipeline test rewritten --- .github/workflows/main.yml | 61 ++++++++++++++++++++++++++++++++++---- 1 file changed, 56 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b552cf071..6e30099fd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -60,10 +60,9 @@ jobs: bundle exec rails db:create RAILS_ENV=test bundle exec rails db:schema:load RAILS_ENV=test - - name: Set up code climate test-reporter + - name: Set up code coverage run: | - gem install codeclimate-test-reporter - cc-test-reporter before-build + echo "SimpleCov coverage reporting is configured in spec_helper.rb" - name: Run model tests run: bundle exec rspec spec/models @@ -71,14 +70,66 @@ jobs: - name: Run controller tests run: bundle exec rspec spec/requests/ - - name: Format code coverage report - run: ./cc-test-reporter format-coverage -t simplecov -o "coverage/codeclimate.models.json" --debug + - name: Generate coverage report + run: | + echo "Coverage report generated in coverage/index.html" + ls -la coverage/ || echo "No coverage directory found" + if [ -f coverage/index.html ]; then + echo "✅ Coverage report generated successfully" + echo "📊 Coverage percentage:" + grep -o '[0-9]\+\.[0-9]\+%' coverage/index.html | head -1 || echo "Coverage percentage not found" + else + echo "❌ Coverage report not generated" + fi - name: Upload coverage artifacts uses: actions/upload-artifact@v4 with: name: code-coverage-artifacts path: coverage/ + + - name: Comment coverage on PR + if: github.event_name == 'pull_request' + uses: actions/github-script@v7 + with: + script: | + const fs = require('fs'); + const path = require('path'); + + try { + // Read coverage data + const coveragePath = 'coverage/coverage.json'; + if (fs.existsSync(coveragePath)) { + const coverage = JSON.parse(fs.readFileSync(coveragePath, 'utf8')); + const percentage = coverage.metrics.covered_percent.toFixed(2); + + const comment = `## 📊 Code Coverage Report + + **Coverage: ${percentage}%** + + - **Lines covered:** ${coverage.metrics.covered_lines}/${coverage.metrics.total_lines} + - **Branches covered:** ${coverage.metrics.covered_branches}/${coverage.metrics.total_branches} + + 📈 Coverage report generated with SimpleCov and Ruby 3.4.5 + +
+ View detailed coverage report + + Coverage artifacts are available in the workflow run. +
`; + + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: comment + }); + } else { + console.log('Coverage file not found'); + } + } catch (error) { + console.log('Error creating coverage comment:', error.message); + } publish_code_coverage: From b2809e90cddba092724c4a1f0f29a1bcdabc0846 Mon Sep 17 00:00:00 2001 From: NDT2000 Date: Mon, 6 Oct 2025 04:34:24 -0400 Subject: [PATCH 15/21] yml file update for new version compatibility --- .github/workflows/danger.yml | 5 ++++- .github/workflows/danger_target.yml | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml index 93e7efc22..3322ec689 100644 --- a/.github/workflows/danger.yml +++ b/.github/workflows/danger.yml @@ -25,7 +25,10 @@ jobs: run: | gem update --system gem install bundler:2.4.7 - bundle install + bundle config set --local deployment 'false' + bundle config set --local without '' + bundle config set --local force_ruby_platform true + bundle install --verbose - name: Run Danger env: diff --git a/.github/workflows/danger_target.yml b/.github/workflows/danger_target.yml index 420690add..c3f005b5d 100644 --- a/.github/workflows/danger_target.yml +++ b/.github/workflows/danger_target.yml @@ -27,7 +27,10 @@ jobs: run: | gem update --system gem install bundler:2.4.7 - bundle install + bundle config set --local deployment 'false' + bundle config set --local without '' + bundle config set --local force_ruby_platform true + bundle install --verbose - name: Run Danger From 000acc8fbbf63c130a1ad2d89dc24a3d87eb682d Mon Sep 17 00:00:00 2001 From: NDT2000 Date: Mon, 6 Oct 2025 04:44:00 -0400 Subject: [PATCH 16/21] Workflow test changes --- .github/workflows/TestPR.yml | 13 ++++++++++++- .github/workflows/danger.yml | 13 ++++++++++++- .github/workflows/danger_target.yml | 13 ++++++++++++- .github/workflows/main.yml | 13 ++++++++++++- 4 files changed, 48 insertions(+), 4 deletions(-) diff --git a/.github/workflows/TestPR.yml b/.github/workflows/TestPR.yml index 6de05a761..e09b92770 100644 --- a/.github/workflows/TestPR.yml +++ b/.github/workflows/TestPR.yml @@ -26,6 +26,14 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Clear Ruby cache + run: | + rm -rf ~/.ruby-version + rm -rf ~/.rbenv + rm -rf ~/.rvm + rm -rf /usr/local/rvm + rm -rf /opt/ruby + - name: Set up Ruby uses: ruby/setup-ruby@v1 with: @@ -33,7 +41,10 @@ jobs: bundler-cache: false - name: Check Ruby Version - run: ruby -v + run: | + ruby -v + which ruby + gem env - name: Setup Node.js uses: actions/setup-node@v3 diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml index 3322ec689..8f1fb8f59 100644 --- a/.github/workflows/danger.yml +++ b/.github/workflows/danger.yml @@ -12,6 +12,14 @@ jobs: with: fetch-depth: 0 + - name: Clear Ruby cache + run: | + rm -rf ~/.ruby-version + rm -rf ~/.rbenv + rm -rf ~/.rvm + rm -rf /usr/local/rvm + rm -rf /opt/ruby + - name: Set up Ruby uses: ruby/setup-ruby@v1 with: @@ -19,7 +27,10 @@ jobs: bundler-cache: false - name: Check Ruby Version - run: ruby -v + run: | + ruby -v + which ruby + gem env - name: Install dependencies run: | diff --git a/.github/workflows/danger_target.yml b/.github/workflows/danger_target.yml index c3f005b5d..18758d617 100644 --- a/.github/workflows/danger_target.yml +++ b/.github/workflows/danger_target.yml @@ -14,6 +14,14 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} fetch-depth: 0 + - name: Clear Ruby cache + run: | + rm -rf ~/.ruby-version + rm -rf ~/.rbenv + rm -rf ~/.rvm + rm -rf /usr/local/rvm + rm -rf /opt/ruby + - name: Set up Ruby uses: ruby/setup-ruby@v1 with: @@ -21,7 +29,10 @@ jobs: bundler-cache: false - name: Check Ruby Version - run: ruby -v + run: | + ruby -v + which ruby + gem env - name: Install dependencies run: | diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6e30099fd..b5c6344ed 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,6 +27,14 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Clear Ruby cache + run: | + rm -rf ~/.ruby-version + rm -rf ~/.rbenv + rm -rf ~/.rvm + rm -rf /usr/local/rvm + rm -rf /opt/ruby + - name: Set up Ruby uses: ruby/setup-ruby@v1 with: @@ -34,7 +42,10 @@ jobs: bundler-cache: false - name: Check Ruby Version - run: ruby -v + run: | + ruby -v + which ruby + gem env - name: Setup Node.js uses: actions/setup-node@v3 From 380bfedc66c29a432304d6f4c2bd647d64ee6f3b Mon Sep 17 00:00:00 2001 From: NDT2000 Date: Mon, 6 Oct 2025 04:45:58 -0400 Subject: [PATCH 17/21] Workflow test changes --- .github/workflows/danger_target.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/danger_target.yml b/.github/workflows/danger_target.yml index 18758d617..983a20d2e 100644 --- a/.github/workflows/danger_target.yml +++ b/.github/workflows/danger_target.yml @@ -14,33 +14,32 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} fetch-depth: 0 - - name: Clear Ruby cache - run: | - rm -rf ~/.ruby-version - rm -rf ~/.rbenv - rm -rf ~/.rvm - rm -rf /usr/local/rvm - rm -rf /opt/ruby - - name: Set up Ruby uses: ruby/setup-ruby@v1 with: ruby-version: '3.4.5' bundler-cache: false + env: + RUBY_VERSION: '3.4.5' - name: Check Ruby Version run: | ruby -v which ruby gem env + echo "RUBY_VERSION=$(ruby -v | cut -d' ' -f2)" >> $GITHUB_ENV - name: Install dependencies + env: + RUBY_VERSION: '3.4.5' run: | gem update --system gem install bundler:2.4.7 bundle config set --local deployment 'false' bundle config set --local without '' bundle config set --local force_ruby_platform true + bundle config set --local path 'vendor/bundle' + bundle config set --local ruby_version '3.4.5' bundle install --verbose From 55cd1085aab775bb27f2d41896d29b51ac3d1062 Mon Sep 17 00:00:00 2001 From: NDT2000 Date: Mon, 6 Oct 2025 04:47:34 -0400 Subject: [PATCH 18/21] Workflow test changes --- .github/workflows/danger_target.yml | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/.github/workflows/danger_target.yml b/.github/workflows/danger_target.yml index 983a20d2e..33fc6c9c8 100644 --- a/.github/workflows/danger_target.yml +++ b/.github/workflows/danger_target.yml @@ -14,36 +14,43 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} fetch-depth: 0 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: '3.4.5' - bundler-cache: false - env: - RUBY_VERSION: '3.4.5' + - name: Set up Ruby using rbenv + run: | + curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash + echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc + echo 'eval "$(rbenv init -)"' >> ~/.bashrc + export PATH="$HOME/.rbenv/bin:$PATH" + eval "$(rbenv init -)" + rbenv install 3.4.5 + rbenv global 3.4.5 + rbenv rehash - name: Check Ruby Version run: | + export PATH="$HOME/.rbenv/bin:$PATH" + eval "$(rbenv init -)" ruby -v which ruby gem env echo "RUBY_VERSION=$(ruby -v | cut -d' ' -f2)" >> $GITHUB_ENV - name: Install dependencies - env: - RUBY_VERSION: '3.4.5' run: | + export PATH="$HOME/.rbenv/bin:$PATH" + eval "$(rbenv init -)" gem update --system gem install bundler:2.4.7 bundle config set --local deployment 'false' bundle config set --local without '' bundle config set --local force_ruby_platform true bundle config set --local path 'vendor/bundle' - bundle config set --local ruby_version '3.4.5' bundle install --verbose - name: Run Danger env: DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: bundle exec danger --verbose + run: | + export PATH="$HOME/.rbenv/bin:$PATH" + eval "$(rbenv init -)" + bundle exec danger --verbose From 2c0b7ddff6cc8807b7a7399b7b0c987b4ba17ec1 Mon Sep 17 00:00:00 2001 From: NDT2000 Date: Mon, 6 Oct 2025 04:49:06 -0400 Subject: [PATCH 19/21] Workflow test changes --- .github/workflows/danger_target.yml | 49 +++++++++++------------------ 1 file changed, 18 insertions(+), 31 deletions(-) diff --git a/.github/workflows/danger_target.yml b/.github/workflows/danger_target.yml index 33fc6c9c8..f12326bc7 100644 --- a/.github/workflows/danger_target.yml +++ b/.github/workflows/danger_target.yml @@ -2,55 +2,42 @@ name: Danger on: pull_request_target: types: [opened, synchronize, reopened] + jobs: danger: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.ref }} repository: ${{ github.event.pull_request.head.repo.full_name }} token: ${{ secrets.GITHUB_TOKEN }} fetch-depth: 0 - - name: Set up Ruby using rbenv + - name: Remove .ruby-version if exists run: | - curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash - echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc - echo 'eval "$(rbenv init -)"' >> ~/.bashrc - export PATH="$HOME/.rbenv/bin:$PATH" - eval "$(rbenv init -)" - rbenv install 3.4.5 - rbenv global 3.4.5 - rbenv rehash + if [ -f .ruby-version ]; then + echo "Removing .ruby-version file" + rm .ruby-version + fi + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.4.5' + bundler-cache: true - - name: Check Ruby Version + - name: Verify Ruby Version run: | - export PATH="$HOME/.rbenv/bin:$PATH" - eval "$(rbenv init -)" + echo "Ruby version:" ruby -v + echo "Ruby path:" which ruby + echo "Gem environment:" gem env - echo "RUBY_VERSION=$(ruby -v | cut -d' ' -f2)" >> $GITHUB_ENV - - - name: Install dependencies - run: | - export PATH="$HOME/.rbenv/bin:$PATH" - eval "$(rbenv init -)" - gem update --system - gem install bundler:2.4.7 - bundle config set --local deployment 'false' - bundle config set --local without '' - bundle config set --local force_ruby_platform true - bundle config set --local path 'vendor/bundle' - bundle install --verbose - - name: Run Danger env: DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - export PATH="$HOME/.rbenv/bin:$PATH" - eval "$(rbenv init -)" - bundle exec danger --verbose + run: bundle exec danger --verbose \ No newline at end of file From 2625ba6347e058d3788d8a93d6347621804cf180 Mon Sep 17 00:00:00 2001 From: NDT2000 Date: Mon, 6 Oct 2025 05:03:38 -0400 Subject: [PATCH 20/21] Workflow test changes --- Gemfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 2b5d0894f..020dbe491 100644 --- a/Gemfile +++ b/Gemfile @@ -3,9 +3,11 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" } ruby '3.4.5' -gem 'mysql2', '~> 0.5.5' +gem 'mysql2', '~> 0.5.7' +gem 'sqlite3', '~> 1.4' # Alternative for development gem 'puma', '~> 5.0' gem 'rails', '~> 8.0', '>= 8.0.1' +gem 'mini_portile2', '~> 2.8' # Helps with native gem compilation gem 'observer' # Required for Ruby 3.4.5 compatibility with Rails 8.0 gem 'mutex_m' # Required for Ruby 3.4.5 compatibility gem 'faraday-retry' # Required for Faraday v2.0+ compatibility From 604ac3e0492f22f5ff9627ea801126079dc415b3 Mon Sep 17 00:00:00 2001 From: NDT2000 Date: Fri, 10 Oct 2025 04:51:06 -0400 Subject: [PATCH 21/21] Workflow correction --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 020dbe491..d3d733e54 100644 --- a/Gemfile +++ b/Gemfile @@ -5,7 +5,7 @@ ruby '3.4.5' gem 'mysql2', '~> 0.5.7' gem 'sqlite3', '~> 1.4' # Alternative for development -gem 'puma', '~> 5.0' +gem 'puma', '~> 6.0' gem 'rails', '~> 8.0', '>= 8.0.1' gem 'mini_portile2', '~> 2.8' # Helps with native gem compilation gem 'observer' # Required for Ruby 3.4.5 compatibility with Rails 8.0 diff --git a/Gemfile.lock b/Gemfile.lock index cf95aea78..b2c2889ee 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -233,7 +233,7 @@ GEM date stringio public_suffix (5.0.3) - puma (5.6.6) + puma (6.6.1) nio4r (~> 2.0) racc (1.7.1) rack (2.2.8) @@ -390,7 +390,7 @@ DEPENDENCIES jwt (~> 2.7, >= 2.7.1) lingua mysql2 (~> 0.5.5) - puma (~> 5.0) + puma (~> 6.0) rack-cors rails (~> 8.0, >= 8.0.1) rspec-rails