Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for issue metadata and dynamic summary #234

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/base-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ jobs:
tmt_plan_regex: "smoke_plan"
pull_request_status_name: "Smoke test"
update_pull_request_status: "true"
create_issue_comment: "true"
1 change: 1 addition & 0 deletions .github/workflows/secrets_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ jobs:
pull_request_status_name: "Secrets test"
secrets: "SOME_DUMMY_SECRET=FOO_BAR_SECRET;OS_SECRET=DUMMY_SECRET_OS"
update_pull_request_status: "true"
create_issue_comment: "true"
1 change: 1 addition & 0 deletions .github/workflows/timeout-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
pull_request_status_name: "Timeout test"
update_pull_request_status: "true"
timeout: 60
create_issue_comment: "true"

- name: Check if testing farm test reached past the timeout limit
if: ${{ !cancelled() }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/variables_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ jobs:
pull_request_status_name: "Variables test"
variables: "SOME_DUMMY_VARIABLE=FOO_BAR_VARIABLE;OS_VARIABLE=DUMMY_OS"
update_pull_request_status: "true"
create_issue_comment: "true"
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ See [Testing Farm onboarding guide](https://docs.testing-farm.io/Testing%20Farm/
|------------|-------------|---------------|
| `github_token` | GitHub token passed from secrets | `${{ github.token }}` |
| `create_issue_comment` | If GitHub action will create a github issue comment | false |
| `pull_request_status_name` | GitHub pull request status name | Fedora |
| `pull_request_status_name` | GitHub pull request status name is also used as the name of the test in the Job Summary and in comments. | Fedora |
| `update_pull_request_status` | Action will update pull request status. | false |
| `environment_settings` | Pass custom settings to the test environment. | empty |
| `pipeline_settings` | Pass specific settings for the testing farm pipeline. For example, `'{ "type": "tmt-multihost" }'`. For details, see `settings.pipeline` field in [Request new test](https://api.testing-farm.io/redoc#operation/request_a_new_test_v0_1_requests_post). | empty |
Expand Down Expand Up @@ -97,7 +97,7 @@ See [Testing Farm onboarding guide](https://docs.testing-farm.io/Testing%20Farm/
> statuses: write
> ```

## Example
## Examples

### Pull request example

Expand Down Expand Up @@ -162,3 +162,16 @@ jobs:
with:
api_key: ${{ secrets.TF_API_KEY }}
```

### How to setup Pull Request summary comments

Set the following inputs:

- `create_issue_comment: 'true'`
- `pull_request_status_name: 'Test name'`

Action uses the `pull_request_status_name` as the name of the test. Also it is used to distinguish between different tests when running multiple tests in parallel.

<p align="center">
<img src="images/summary-comment.png" width="600" alt="Summary comment example" />
</p>
53 changes: 29 additions & 24 deletions dist/action.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading