Skip to content

ci: replace archived codeclimate-action with qlty-action#49

Open
bskim45 wants to merge 1 commit into
mainfrom
ci/qlty-coverage
Open

ci: replace archived codeclimate-action with qlty-action#49
bskim45 wants to merge 1 commit into
mainfrom
ci/qlty-coverage

Conversation

@bskim45
Copy link
Copy Markdown
Owner

@bskim45 bskim45 commented Apr 11, 2026

Summary

Follow-ups

  • Register this repo on Qlty Cloud and enable OIDC so the upload succeeds. The step is gated to Ruby 3.1 and uses skip-errors: true by default, so failures here won't break CI.
  • The stale CC_TEST_REPORTER_ID secret can be removed from the repo settings.
  • Does not address the Ruby 2.7 ostruct Gemfile mismatch — tracked separately.

Test plan

  • CI runs on this PR
  • Ruby 3.1 job reaches the qlty upload step and either uploads successfully (once Qlty Cloud is set up) or no-ops without failing the build

Summary by CodeRabbit

  • Chores
    • Updated CI/CD pipeline security permissions for automated testing.
    • Changed coverage reporting integration to use Qlty Cloud for Ruby 3.1+ builds.

paambaati/codeclimate-action is archived and the CodeClimate
test-reporter download now returns 404, breaking coverage upload on
Ruby 3.1.

Migrate to qltysh/qlty-action/coverage@v2 per the qlty migration guide
(https://docs.qlty.sh/migration/coverage). Uses OIDC for auth so no
coverage token secret is required. Points at the SimpleCov JSON
formatter output already produced by the test suite.
Copilot AI review requested due to automatic review settings April 11, 2026 10:04
@gemini-code-assist
Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 11, 2026

Walkthrough

GitHub Actions workflow for the test job is updated to add job-level permissions, remove Code Climate coverage reporting integration, and introduce Qlty Cloud coverage upload for Ruby 3.1.

Changes

Cohort / File(s) Summary
CI Workflow Configuration
.github/workflows/rubygems.yml
Added contents: read and id-token: write permissions. Removed Code Climate integration (CC_TEST_REPORTER_ID env and paambaati/codeclimate-action@v9.0.0). Added conditional coverage upload to Qlty Cloud (qltysh/qlty-action/coverage@v2) for Ruby 3.1 targeting coverage/coverage.json.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'ci: replace archived codeclimate-action with qlty-action' directly and clearly summarizes the main change in the pull request. It is concise, specific, and accurately reflects the primary objective of replacing an archived GitHub Actions with a new one.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/qlty-coverage

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Migrates CI coverage upload in the Ruby test workflow away from the archived paambaati/codeclimate-action to Qlty’s coverage action, using OIDC authentication.

Changes:

  • Adds id-token: write (and explicit contents: read) permissions to the test job for OIDC-based auth.
  • Replaces the CodeClimate action step with qltysh/qlty-action/coverage@v2 targeting coverage/coverage.json with format: simplecov.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

CC_TEST_REPORTER_ID: "${{ secrets.CC_TEST_REPORTER_ID }}"
with:
oidc: true
files: coverage/coverage.json
Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

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

The workflow uploads coverage/coverage.json, but the repo’s SimpleCov setup (spec/spec_helper.rb) only calls SimpleCov.start and does not configure the JSON formatter, so coverage/coverage.json is unlikely to be generated. Either update the SimpleCov configuration to emit coverage/coverage.json via simplecov_json_formatter, or point files: at the SimpleCov output file that is actually produced (e.g., .resultset.json if that’s what Qlty expects for format: simplecov).

Suggested change
files: coverage/coverage.json
files: coverage/.resultset.json

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/rubygems.yml:
- Around line 59-65: The "Upload coverage to Qlty Cloud" step can fail the job
when Qlty/OIDC or project setup is incomplete; make it non-blocking by adding
continue-on-error: true and pass the action input skip-errors: true to
qltysh/qlty-action/coverage@v2, and avoid running it when the artifact is
missing by adding a prior step (e.g., "check-coverage-artifact") that tests for
coverage/coverage.json and sets outputs.coverage_exists, then change this step's
if to: matrix.ruby-version == '3.1' &&
steps.check-coverage-artifact.outputs.coverage_exists == 'true' so the upload
only runs when the file exists and never fails the workflow.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 5754bcc8-9d17-4d64-9996-c1c79ef38334

📥 Commits

Reviewing files that changed from the base of the PR and between b1ed775 and 51a361e.

📒 Files selected for processing (1)
  • .github/workflows/rubygems.yml

Comment on lines +59 to +65
- name: Upload coverage to Qlty Cloud
uses: qltysh/qlty-action/coverage@v2
if: matrix.ruby-version == '3.1'
env:
CC_TEST_REPORTER_ID: "${{ secrets.CC_TEST_REPORTER_ID }}"
with:
oidc: true
files: coverage/coverage.json
format: simplecov
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.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

For qltysh/qlty-action/coverage@v2, what is the default behavior when upload/auth fails, and is there a supported input like skip-errors to avoid failing CI?

💡 Result:

The default behavior of qltysh/qlty-action/coverage@v2 when upload/auth fails is to fail the GitHub Action step, causing the CI workflow to fail. This is evidenced by GitHub issue #145 where the action crashes on upload attempt with an authentication-related panic/error, and official docs describe authentication failures (e.g., invalid token, OIDC issues on forks) as errors that prevent successful uploads. There is a supported input skip-errors that can be set to true to avoid failing CI on certain errors. In issue #145, a user explicitly used skip-errors: false (implying default may be true or configurable), and the action continued processing files before failing on upload/parsing. Setting skip-errors: true likely skips upload failures without failing the step, though official action.yml/docs do not explicitly list all inputs (action is a wrapper around qlty coverage publish, which has --no-validate but no direct skip-auth flag).

Citations:


🏁 Script executed:

# First, let's examine the actual workflow file to see the current state
cat -n .github/workflows/rubygems.yml | sed -n '59,65p'

Repository: bskim45/fastlane-plugin-google_drive

Length of output: 361


🏁 Script executed:

# Check if there's any documentation or action.yml in the repo related to qlty-action
find . -type f -name "*.yml" -o -name "*.yaml" -o -name "action.yml" | xargs grep -l "qlty" 2>/dev/null | head -20

Repository: bskim45/fastlane-plugin-google_drive

Length of output: 112


🌐 Web query:

qltysh/qlty-action/coverage@v2 skip-errors input documentation

💡 Result:

The qltysh/qlty-action/coverage@v2 GitHub Action is a reusable action for uploading code coverage data to Qlty Cloud. It requires a free Qlty Cloud account. Usage example from official Qlty documentation: - uses: qltysh/qlty-action/coverage@v2 with: oidc: true files: coverage/lcov.info Or with token: - uses: qltysh/qlty-action/coverage@v2 with: token: ${{ secrets.QLTY_COVERAGE_TOKEN }} files: coverage/lcov.info The skip-errors input is shown in a real-world usage example from GitHub issue #145 in the repository: - uses: qltysh/qlty-action/coverage@v2 with: oidc: true files: app/coverage.lcov skip-errors: false add-prefix: app/ This suggests skip-errors is a boolean input (default likely true) that controls whether to skip (continue on) errors during coverage processing or upload, such as parsing failures. Setting it to false makes the action fail on errors, as seen in the crash report where a parsing panic occurred. Other common inputs from examples and CLI mapping (qlty coverage publish): - token: Qlty coverage token (alternative to oidc) - oidc: Use OIDC authentication (boolean) - files: Path(s) to coverage report file(s) - tag: Coverage tag for organization - add-prefix: Prefix to add to file paths - total-parts-count: For server-side merging - format: Coverage format (inferred or specified) The action wraps the qlty coverage publish CLI command, passing inputs as flags. Full inputs are defined in the action's action.yml file (not directly surfaced in search snippets), but skip-errors allows error-tolerant uploads, useful for malformed reports. For complete documentation, see Qlty Docs: https://docs.qlty.sh/coverage/quickstart and repository: https://github.com/qltysh/qlty-action

Citations:


🌐 Web query:

qltysh/qlty-action action.yml inputs skip-errors default value

💡 Result:

The default value for the 'skip-errors' input in qltysh/qlty-action's action.yml is false. This input is used in the qltysh/qlty-action/coverage action to control whether to skip errors during coverage upload (e.g., parsing failures). It is explicitly set to skip-errors: false in usage examples from issue reports.

Citations:


🌐 Web query:

GitHub Actions continue-on-error vs skip-errors best practice workflow reliability

💡 Result:

skip-errors is not a recognized GitHub Actions feature. The standard mechanism for handling errors without halting execution is continue-on-error: true, available at both job and step levels. Key differences and behaviors from official documentation and community sources: - Step level (jobs.<job_id>.steps[*].continue-on-error): When true, a step failure does not fail the job. The step's outcome remains 'failure' (accessible via steps.<step_id>.outcome), but conclusion is 'success'. Subsequent steps run normally. The job shows as failed if any non-continued step fails. Use for non-critical steps like optional coverage checks or notifications, where you want to upload artifacts/logs despite failure. Example: - name: Optional check id: check continue-on-error: true run: exit 1 - name: Upload if failed if: steps.check.outcome == 'failure' run: echo "Failed but continuing" - Job level (jobs.<job_id>.continue-on-error): When true, a job failure does not fail the workflow. The job shows as failed (red X), but dependent jobs (via needs) can run if their if allows (e.g., if: always). Use for experimental matrix jobs. Example for matrix: test: continue-on-error: ${{ matrix.experimental }} strategy: matrix: experimental: [true, false] For workflow reliability best practices: - Prefer if: success || failure or if: !cancelled on cleanup/upload steps over continue-on-error at step level. This runs always (except cancel), keeps failure visible, no special outcome checking needed. Sources confirm this shows correct failure status while continuing. - For matrices: strategy.fail-fast: false + no continue-on-error lets all jobs run, workflow fails if any does (preferred for full visibility). - Use steps..outcome to check true failure after continue-on-error. - Avoid overusing continue-on-error as it can mask issues; combine with notifications (e.g., PR comments on failure). - Set timeout-minutes and retry for resilience. This ensures reliability: failures are visible, workflows continue for cleanup/completeness, no silent ignores.

Citations:


Make coverage upload explicitly non-blocking (per PR objective).

On lines 59-65, this step can still fail the job when Qlty Cloud/OIDC/project setup is incomplete. The action defaults to failing on errors (skip-errors defaults to false), so add a hard non-blocking guard at the GitHub Actions level and skip when the coverage artifact is missing.

Proposed workflow hardening
       - name: Upload coverage to Qlty Cloud
         uses: qltysh/qlty-action/coverage@v2
-        if: matrix.ruby-version == '3.1'
+        if: matrix.ruby-version == '3.1' && hashFiles('coverage/coverage.json') != ''
+        continue-on-error: true
         with:
           oidc: true
           files: coverage/coverage.json
           format: simplecov
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/rubygems.yml around lines 59 - 65, The "Upload coverage to
Qlty Cloud" step can fail the job when Qlty/OIDC or project setup is incomplete;
make it non-blocking by adding continue-on-error: true and pass the action input
skip-errors: true to qltysh/qlty-action/coverage@v2, and avoid running it when
the artifact is missing by adding a prior step (e.g., "check-coverage-artifact")
that tests for coverage/coverage.json and sets outputs.coverage_exists, then
change this step's if to: matrix.ruby-version == '3.1' &&
steps.check-coverage-artifact.outputs.coverage_exists == 'true' so the upload
only runs when the file exists and never fails the workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants