Skip to content

CI: Output a summary using GITHUB_SUMMARY#7192

Merged
samuelkarp merged 2 commits intocontainerd:mainfrom
cpuguy83:test_summary
Sep 26, 2022
Merged

CI: Output a summary using GITHUB_SUMMARY#7192
samuelkarp merged 2 commits intocontainerd:mainfrom
cpuguy83:test_summary

Conversation

@cpuguy83
Copy link
Copy Markdown
Member

@cpuguy83 cpuguy83 commented Jul 20, 2022

Uses teststat to parse the go test json and output markdown which will
be posted as a summary to the github action run.

Also adds annotations for failed tests so the test failure is surfaced right into the github summary.
If the error occurred for a test in the diff, the annotation will also appear in the diff at the line number of the failure.
It uses the last test log message to determine the file/line number.
One thing I noticed with this, not all log messages originate from a _test.go, in which case the file/line number are not attached to the annotation.

@k8s-ci-robot
Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@cpuguy83 cpuguy83 force-pushed the test_summary branch 20 times, most recently from 3a95944 to 69e7183 Compare July 27, 2022 18:51
@cpuguy83 cpuguy83 force-pushed the test_summary branch 9 times, most recently from 6de9624 to 1352e46 Compare July 28, 2022 17:11
@cpuguy83 cpuguy83 force-pushed the test_summary branch 2 times, most recently from d961d16 to f73f529 Compare July 29, 2022 21:55
@cpuguy83 cpuguy83 marked this pull request as ready for review August 1, 2022 23:51
@cpuguy83
Copy link
Copy Markdown
Member Author

cpuguy83 commented Aug 2, 2022

/test pull-containerd

@k8s-ci-robot
Copy link
Copy Markdown

@cpuguy83: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test pull-containerd-build
  • /test pull-containerd-node-e2e
  • /test pull-containerd-sandboxed-node-e2e

Use /test all to run the following jobs that were automatically triggered:

  • pull-containerd-build
  • pull-containerd-node-e2e
Details

In response to this:

/test pull-containerd

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@cpuguy83
Copy link
Copy Markdown
Member Author

cpuguy83 commented Aug 2, 2022

/test pull-containerd-build

@cpuguy83 cpuguy83 closed this Sep 6, 2022
@cpuguy83 cpuguy83 reopened this Sep 6, 2022
@samuelkarp
Copy link
Copy Markdown
Member

@cpuguy83 It looks like the K8s tests are failing because of the merge conflict. Mind rebasing?

Uses teststat to parse the go test json and output markdown which will
be posted as a summary to the github action run.

Signed-off-by: Brian Goff <[email protected]>
@cpuguy83
Copy link
Copy Markdown
Member Author

Rebased

""; . += "::error title=\($item | err_title)\($item | details_to_string)::\($item.Output | encode_output)\n"
);

group_tests | only_failed | merge_output | to_error No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: missing newline at the end of the file

@samuelkarp samuelkarp merged commit 34d078e into containerd:main Sep 26, 2022
@cpuguy83 cpuguy83 deleted the test_summary branch November 15, 2022 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants