Skip to content

ci: integrate Qlty coverage reporting#6980

Closed
davehenton wants to merge 1 commit intoFlagsmith:mainfrom
dh-sandbox:qlty-coverage-integration
Closed

ci: integrate Qlty coverage reporting#6980
davehenton wants to merge 1 commit intoFlagsmith:mainfrom
dh-sandbox:qlty-coverage-integration

Conversation

@davehenton
Copy link

Summary

  • Replace Codecov with Qlty for code coverage reporting in the API and frontend CI workflows
  • API tests (pytest-cov, Cobertura XML) upload with the api coverage tag
  • Frontend unit tests (Jest, LCOV) upload with the frontend coverage tag
  • Coverage tags provide per-component visibility in the monorepo

Changes

  • .github/workflows/api-pull-request.yml: Replaced codecov/codecov-action@v5 with qltysh/qlty-action/coverage@v2. Upload runs only on Python 3.13 matrix entry (avoids redundant uploads). Removed id-token: write permission (no longer needed without OIDC). Added add-prefix: api/ to fix paths relative to repo root.
  • .github/workflows/frontend-pull-request.yml: Added --coverage flag to Jest test command. Added Qlty coverage upload step with add-prefix: frontend/.

Manual steps required

  1. Add the QLTY_COVERAGE_TOKEN repository secret:
    • Go to Qlty Cloud → Workspace Settings → Code Coverage → copy the workspace coverage token
    • Go to GitHub → repo Settings → Secrets and variables → Actions → New repository secret
    • Name: QLTY_COVERAGE_TOKEN, Value: the token from Qlty

Test plan

  • Add the QLTY_COVERAGE_TOKEN secret to the repository
  • Verify API workflow uploads coverage data successfully
  • Verify frontend workflow uploads coverage data successfully
  • Check Qlty Cloud dashboard shows coverage for both api and frontend tags

🤖 Generated with Claude Code

Replace Codecov with Qlty coverage uploads in CI workflows. API tests
(pytest-cov, Cobertura XML) upload with the `api` tag; frontend unit
tests (Jest, LCOV) upload with the `frontend` tag. Coverage tags give
per-component visibility in the monorepo.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@davehenton davehenton requested a review from a team as a code owner March 18, 2026 14:02
@davehenton davehenton requested review from gagantrivedi and removed request for a team March 18, 2026 14:02
Copy link

@claude claude bot left a comment

Choose a reason for hiding this comment

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

⚠️ Code review skipped — your organization's overage spend limit has been reached.

Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit in Settings → Usage.

Once credits are available, reopen this pull request to trigger a review.

@vercel
Copy link

vercel bot commented Mar 18, 2026

@davehenton is attempting to deploy a commit to the Flagsmith Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

env_vars: PYTHON
use_oidc: true
token: ${{ secrets.QLTY_COVERAGE_TOKEN }}
files: coverage.xml
Copy link

Choose a reason for hiding this comment

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

Coverage file path wrong due to working directory

High Severity

The files paths in both Qlty coverage upload steps are incorrect. defaults.run.working-directory only applies to run steps, not uses steps — the action resolves files relative to the repo root. make test generates api/coverage.xml but files: coverage.xml looks at the root. Similarly, Jest generates frontend/coverage/lcov.info but files: coverage/lcov.info looks at the root. Both uploads will fail to find their coverage files.

Additional Locations (1)
Fix in Cursor Fix in Web

Copy link
Contributor

@emyller emyller left a comment

Choose a reason for hiding this comment

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

We appreciate the approach.

Even after looking at https://qlty.sh/, It's not immediately clear to me what the benefits are, e.g. how this looks, how it helps our current workflow. Can you please elaborate?

Also, does it offer a pricing model for OSS?

@davehenton davehenton closed this Mar 18, 2026
@davehenton davehenton deleted the qlty-coverage-integration branch March 18, 2026 19:46
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