CI has no lockfile and cannot fail on missing scripts; release skips tests
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 52/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- eslint, github-actions, javascript, node.js
- Lĩnh vực
- build-system, ci-cd, release, tooling
Hướng nghiên cứu
Start with .github/workflows/ci.yml, .github/workflows/release.yml, and package.json; read the workflow definitions and package scripts, then run npm test and npm run lint. Check each suggested fix against the acceptance criteria, including reproducible installs and preventing releases from failing commits. Done when the CI and release workflows enforce the listed checks and the three acceptance criteria pass.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
The CI and release workflows have several gaps that make builds non-reproducible and let a release go out from a commit that fails tests.
Where
.github/workflows/ci.yml:9-19.github/workflows/release.yml:3-6,.github/workflows/release.yml:33-37package.json:4,package.json:7-11
Details
- run: npm install
- run: npm run lint --if-present
- run: npm test --if-present -- --ci
- No lockfile is committed and CI uses
npm install, so every run resolves fresh versions inside the caret ranges, for direct and transitive packages. --if-presentturns a deleted or renamed script into a green step.npm run format(prettier --check .) exists but CI never runs it.- There is no coverage script, although
coverage/is already in.gitignore. ci.ymlhas nopermissions:block, so its token scope depends on the repository default.release.ymlpublishes on anyv*tag without running lint or tests.- The fallback release body is built as
"# Release ${TAG}\n\nSee ..."and printed withecho, so the published body contains literal\n\n. TheGITHUB_OUTPUTheredoc uses a fixedEOFdelimiter, which breaks if the notes contain a lineEOF. "lint": "eslint . --ext .js"uses a legacy flag; the flat config already scopes files.package.jsonversion is0.0.0whilev0.1.0is released.
Suggested fix
- Commit
package-lock.json, switch tonpm ci, addcache: npmto setup-node - Drop
--if-present - Add
npm run formatto CI - Add
"coverage": "jest --coverage"withcollectCoverageFrom: ["js/**/*.js"]and print the summary in CI - Add top-level
permissions: contents: readtoci.yml - Make the release job depend on a test job
- Use
printfand a random heredoc delimiter inrelease.yml - Drop
--ext .js; set the package version or state that it is unused
Acceptance criteria
- Two CI runs on the same commit install the same dependency tree
- Removing the
testscript fails CI - A tag on a commit with failing tests does not publish a release
Getting started
- Relevant files:
.github/workflows/ci.yml,.github/workflows/release.yml,package.json - How to run tests:
npm install, thennpm testandnpm run lint - Related docs:
docs/ARCHITECTURE.md,.github/CONTRIBUTING.md
Filed by repo-audit/full-audit at 8a2c86c. Severity: medium. Effort: S. audit-key: quality|.github/workflows/ci.yml|jobs.test
- Ngôn ngữ chính
- JavaScript
- Star
- 4
- Fork
- 2
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của TMHSDigital/Static_Chess
-
enhancement good first issue severity: medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
TMHSDigital/Static_Chess#53 ·
-
documentation good first issue severity: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
TMHSDigital/Static_Chess#49 ·
-
documentation good first issue severity: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
TMHSDigital/Static_Chess#48 ·
-
documentation severity: medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
TMHSDigital/Static_Chess#47 ·
-
documentation good first issue severity: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
TMHSDigital/Static_Chess#46 ·
Tất cả issue của TMHSDigital/Static_Chess
Issue tương tự
-
good first issue tests
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Download a leaderboard as CSVĐang mởenhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
-
1️⃣ phase/under-investigation flaky/confirmed flaky/needs-decision type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
growilabs/growi#12246 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
TMHSDigital/Free-Game-Dev-Assets#301 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100