remove the dependency patch when the JUnit root-layout fix is released:
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 73/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- github-actions, javascript, node.js
Hướng nghiên cứu
Bắt đầu với actions/quality/prepare-ci-reports/src/TestReports.js và kiểm tra dependency junit-to-ctrf cùng bản sửa lỗi root-layout được liên kết, pull request 93. Kiểm tra xem bản sửa lỗi đó đã được phát hành chưa và patch cho dependency được áp dụng như thế nào; gỡ patch sau khi bản phát hành có sẵn. Xác nhận rằng bộ chuyển đổi vẫn xử lý các báo cáo JUnit và tạo ra một báo cáo CTRF hợp lệ, không rỗng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
https://github\.com/ctrf\-io/junit\-to\-ctrf/pull/93
import fs from "node:fs";
import { validate } from "ctrf";
import { XMLValidator } from "fast-xml-parser";
// FIXME: remove the dependency patch when the JUnit root-layout fix is released:
// https://github.com/ctrf-io/junit-to-ctrf/pull/93
import { convertJUnitToCTRFReport } from "junit-to-ctrf";
import { JestReport } from "./JestReport.js";
import { SourcePaths } from "./SourcePaths.js";
/** Adapt native runner output to the maintained CTRF converters and schema. */
export class TestReports {
constructor(options) {
this.options = options;
}
async convert(file, target) {
const options = { ...this.options, output: `${target}.json` };
const content = fs.readFileSync(file, "utf8");
let report;
if (content.trimStart().startsWith("<")) {
if (
/<!ENTITY|<!DOCTYPE/i.test(content) ||
XMLValidator.validate(content) !== true
)
throw new Error("Invalid or unsafe JUnit XML.");
report = await convertJUnitToCTRFReport(file, {
toolName: options.name,
log: false,
});
} else {
const value = JSON.parse(content);
report = value.results
? value
: await new JestReport(options).convert(value);
}
const result = validate(report);
if (!result.valid || !report?.results?.tests?.length)
throw new Error(
`Expected a nonempty valid test report: ${JSON.stringify(result.errors)}`,
);
for (const test of report.results.tests) {
const source = new SourcePaths(options).resolve(test.filePath);
if (source) test.filePath = source;
else delete test.filePath;
}
report.results.environment = {
...report.results.environment,
appName: options.project,
buildName: options.name,
};
report.results.extra = {
...report.results.extra,
variant: options.variant,
};
fs.writeFileSync(options.output, JSON.stringify(report));
return { file: options.output, summary: report.results.summary };
}
}
- Ngôn ngữ chính
- JavaScript
- Star
- 5
- Fork
- 1
- Merge trung bình
- 5 giờ 25 phút
- Pull request đã merge (30 ngày)
- 60
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- Không 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 hoverkraft-tech/ci-github-common
-
bug need-fix
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 76/100
hoverkraft-tech/ci-github-common#691 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug need-fix
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
hoverkraft-tech/ci-github-common#690 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug need-fix
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 83/100
hoverkraft-tech/ci-github-common#688 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug need-fix
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
hoverkraft-tech/ci-github-common#695 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug need-fix
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
hoverkraft-tech/ci-github-common#693 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của hoverkraft-tech/ci-github-common
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 83/100
TheOdinProject/curriculum#31596 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
mailcow/mailcow-dockerized#7725 ·
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 94/100
solana-foundation/solana-com#2579 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 85/100
vercel-labs/agent-skills#385 ·
-
documentation good first issue
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
danielcuesta007/skeptic#73 ·
Maintainer thường phản hồi trong vòng 1 ngày