[Feature]: Add CI checks for pull requests

Đang mở
#52 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
github-actions, json, python, yaml
Lĩnh vực
ci-cd, tooling

Hướng nghiên cứu

Read .github/workflows/update_plugin.yaml and script/update_plugin.py first to see how sources are validated and how plugins/index.json is rebuilt, then compare a few files under sources/ with their plugins/*.json counterparts. The issue's own checklist (steps 1 and 2) is the scope to agree on before coding, since the test block and smoke test are still open questions for the maintainers. Done looks like a new pull-request workflow that fails on invalid or orphaned source files.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement help wanted
1. Your usage scenarios?

Pull requests in this repo get no automated checks. I checked PRs 30, 32, 34, 41 and 42, and none of them has a status or a check run. PR 42 was approved and merged with no checks at all. PR 34, a Dependabot bump of actions/checkout, is still open with no checks.

The only workflow is .github/workflows/update_plugin.yaml. It runs every hour and on manual dispatch, never on pull requests. It reads sources/, updates plugins/*.json, rebuilds plugins/index.json, commits the result to the branch and deploys Pages. The registry docs say a merged source is published automatically and checked every hour, so the generated files reach the site without a review.

Some problems I found while reading the repo:

  • PR 35 changed plugins/chaosblade.json and plugins/index.json directly, with no file under sources/. The hourly job rebuilds the index from sources/, so chaosblade is missing from plugins/index.json now, and the job never updates its file.
  • The registry docs describe a test block in the source file format (version, check, resultRegx). Nothing in this repo reads it.
  • As far as I can read script/update_plugin.py, a source whose manifest or zip download fails is only printed. The run still exits 0, and that plugin is left out of plugins/index.json for that run.
  • ad-m/github-push-action@master is not pinned to a release or a commit.
2. What is your expected outcome?

A workflow that runs on pull requests and has to pass before merge. These are the checks I would start with, in this order:

  1. For each changed sources/*.json: valid JSON, name and manifestUrl present, and the file name equal to name.
  2. Every plugins/*.json has a source file, and every source has an entry in plugins/index.json.
  3. Run script/update_plugin.py in the check, and fail if any source fails.
  4. For each changed source, install test.version with vfox, run test.check and match test.resultRegx. This needs a vfox binary and a real download, so it is slower and can be flaky. I would start with Linux only.
  5. Pin third-party actions to a full commit SHA.

Questions for the maintainers:

  • Should the hourly job fail when a source fails, or only report it?
  • Should the test block run in CI, and should new sources be required to have one?
  • Which systems should the smoke test cover?

Once we agree on the scope, I can send a PR for steps 1 and 2.

Ngôn ngữ chính
Python
Star
32
Fork
21
Merge trung bình
4 giờ 55 phút
Pull request đã merge (30 ngày)
3

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của version-fox/vfox-plugins

Tất cả issue của version-fox/vfox-plugins

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.