ci: GitHub Actions workflow (build, lint, test) [RHIDP-14958]#3
Conversation
- Triggers on push to main and pull_request targeting main - Single job on ubuntu-latest / Node.js 22 - npm ci → npm run build → npm run lint → npm test - Dependency cache keyed on package-lock.json via actions/setup-node cache - Concurrency group cancels in-progress runs on the same ref Closes: RHIDP-14958 Epic: RHIDP-14946 Feature: RHDHPLAN-1525 Co-authored-by: Cursor <cursoragent@cursor.com>
PR Summary by QodoAdd GitHub Actions CI workflow for build, lint, and test Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
Context used✅ Tickets:
RHIDP-14958 1. Unpinned GitHub actions
|
- Pin actions/checkout and actions/setup-node to immutable commit SHAs (with # v4 comments for readability) — prevents supply-chain risk from mutable tag retargeting - Add top-level permissions: contents: read — explicitly constrains GITHUB_TOKEN to the minimum needed; build/lint/test jobs do not write to the repo or packages Fixes Qodo bugs redhat-ai-dev#1 and redhat-ai-dev#2 Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
.github/workflows/ci.ymltriggered on push tomainand all PRs targetingmainubuntu-latest, steps:npm ci→npm run build→npm run lint→npm testpackage-lock.jsonviaactions/setup-node@v4 cache: npm— no manual cache step neededJira
Test plan
Notes
Once merged, all future PRs will have CI gating. Branch protection rules on
maincan be configured to require this check.Made with Cursor