Skip to content

ci: Codecov hardening and release smoke tests - #83

Merged
zx06 merged 9 commits into
mainfrom
cursor/ci-release-hardening-acf8
Oct 10, 2026
Merged

zx06 merged 9 commits into
mainfrom
cursor/ci-release-hardening-acf8

Conversation

@zx06

@zx06 zx06 commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner

Summary

Hardens CI coverage reporting and adds automated release smoke tests so broken artifacts or npm packages are caught before publish.

Codecov

  • Upload steps use fail_ci_if_error: true when CODECOV_TOKEN is present (detected via a dedicated step; secrets are not used in if expressions).
  • Missing token → skip upload with log (fork / Dependabot).
  • skip_validation: true avoids flaky Codecov CLI GPG verification; upload failures still fail the job.

Release smoke tests

Order unchanged: snapshot build → smoke → GoReleaser release → npm publish.

Scripts: scripts/release-smoke.js, scripts/release-artifacts.js.

Security / quality (follow-up)

  • actionlint: no curl/bash; run from locked .github/tools/go.mod + go.sum via go run.
  • Workflows: least-privilege permissions (contents: read, actions: read/write where needed); setup-node pinned to SHA 48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e.
  • release-smoke.js: node: imports, platform allowlist, chmod without group/world write, npm/npx via absolute paths beside node (Windows uses shell: true for .cmd only).
  • Merged latest main into the branch.

CI status (head 4b86ecc)

  • Release dry run: actionlint, GoReleaser snapshot, all binary + npm smoke jobs — pass (run 38032528233).
  • CodeQL: pass (actions / go / javascript-typescript).
  • SonarCloud quality gate: OK; Security Rating on New Code = A (new_security_rating actual 1).

中文摘要

  • 已合并最新 main;发布流程仍为 snapshot → 冒烟 → 发布。
  • Sonar/CodeQL 指出的问题已处理:actionlint 改为 go.sum 锁定模块、workflow 最小权限、第三方 action SHA 固定、release-smoke.js 权限与命令执行加固。
  • 最新 CI:dry-run 全绿;Sonar 质量门通过,新代码安全评级 A;CodeQL 通过。
Open in Web Open in Cursor 

- Fail CI when Codecov upload errors if CODECOV_TOKEN is present; skip
  uploads gracefully when the secret is unavailable (fork/Dependabot).
- Split release into snapshot build, cross-platform binary/npm smoke tests,
  then GoReleaser publish and npm publish.
- Add release dry-run workflow (actionlint + goreleaser snapshot) for PRs.
- Document release checks in docs/dev.md.

Co-authored-by: x_zhuo <zx06@users.noreply.github.com>
Comment thread scripts/release-smoke.js Fixed
Comment thread scripts/release-smoke.js Fixed
Comment thread scripts/release-smoke.js Fixed
Comment thread scripts/release-smoke.js Fixed
Comment thread scripts/release-smoke.js Fixed
Comment thread scripts/release-smoke.js Fixed
Co-authored-by: x_zhuo <zx06@users.noreply.github.com>
@codecov

codecov Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.44%. Comparing base (b9b8022) to head (4b86ecc).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #83      +/-   ##
==========================================
+ Coverage   84.32%   84.44%   +0.12%     
==========================================
  Files          67       69       +2     
  Lines        6367     6744     +377     
==========================================
+ Hits         5369     5695     +326     
- Misses        723      766      +43     
- Partials      275      283       +8     
Flag Coverage Δ
e2e 28.67% <ø> (+1.02%) ⬆️
integration 28.67% <ø> (+1.02%) ⬆️
unittests 78.03% <ø> (+0.43%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

cursoragent and others added 2 commits October 10, 2026 06:22
Co-authored-by: x_zhuo <zx06@users.noreply.github.com>
Co-authored-by: x_zhuo <zx06@users.noreply.github.com>
Comment thread scripts/release-smoke.js Fixed
Comment thread scripts/release-smoke.js Fixed
Comment thread scripts/release-smoke.js Fixed
Comment thread scripts/release-smoke.js Fixed
Comment thread scripts/release-smoke.js Fixed
cursoragent and others added 5 commits October 10, 2026 06:34
Co-authored-by: x_zhuo <zx06@users.noreply.github.com>
- Run actionlint via pinned go install instead of curl/bash.
- Add least-privilege permissions (contents/actions) on release workflows.
- Pin setup-node to full commit SHA in new/changed workflows.
- Harden release-smoke.js: node: imports, platform allowlist, tight chmod,
  invoke npm/npx via absolute paths next to node.

Co-authored-by: x_zhuo <zx06@users.noreply.github.com>
Co-authored-by: x_zhuo <zx06@users.noreply.github.com>
Co-authored-by: x_zhuo <zx06@users.noreply.github.com>
Co-authored-by: x_zhuo <zx06@users.noreply.github.com>
@sonarqubecloud

Copy link
Copy Markdown

@zx06
zx06 merged commit e38d7ea into main Oct 10, 2026
23 checks passed
cursor Bot pushed a commit that referenced this pull request Oct 10, 2026
Co-authored-by: x_zhuo <zx06@users.noreply.github.com>
@zx06
zx06 deleted the cursor/ci-release-hardening-acf8 branch October 20, 2026 03:41
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.

3 participants