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 fork repositories support for reporting regression tests #508

Merged
merged 15 commits into from
Nov 27, 2023

Conversation

makz00
Copy link
Contributor

@makz00 makz00 commented Nov 10, 2023

Issue: #492

The solution proposed in: support-fork-repositories-and-dependabot-branches has been applied. It is based on dedicated workflow that is only responsible for creating tests report. The report input data are saved as artifact by CI workflow.

@@ -0,0 +1,44 @@
name: Tests results
Copy link
Member

Choose a reason for hiding this comment

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

Fix grammar. It is customary to use a singular form ("test results").

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Comment on lines 81 to 87
# - name: Test Report
# uses: EnricoMi/publish-unit-test-result-action@v2
# with:
# files: test/regression/cocotb/results.xml
# check_name: cocotb test results
# comment_mode: off

Copy link
Member

Choose a reason for hiding this comment

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

Remove commented out lines.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Comment on lines 32 to 36
- name: Download and Extract Artifacts
uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615
with:
run_id: ${{ github.event.workflow_run.id }}
path: artifacts
Copy link
Member

Choose a reason for hiding this comment

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

This should preferably only download only the needed artifacts.

Copy link
Contributor

@lekcyjna123 lekcyjna123 left a comment

Choose a reason for hiding this comment

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

What is the idea behind these changes? CI jobs are run on fork and Test result is run on trunk? Or I am wrong?


steps:
- name: Download and Extract Artifacts
uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not actions/download-artifact?

Copy link
Contributor Author

@makz00 makz00 Nov 12, 2023

Choose a reason for hiding this comment

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

Don't know the source of problem with that action, but according to dawidd6/action-download-artifact, official actions/download-artifact does not allow to download an artifact uploaded in other workflow.

uses: actions/upload-artifact@v3
with:
name: Event File
path: ${{ github.event_path }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why you upload the whole directory instead of event.json?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why are you claiming that this is directory? ${{ github.event_path }} is pointing to event.json file.

check_name: cocotb test results
comment_mode: off
name: Tests results
path: test/regression/cocotb/results.xml
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe you can upload event.json here to don't create separate step? This will reduce resource usage.

@tilk
Copy link
Member

tilk commented Nov 11, 2023

@lekcyjna123: the simple answer to your question is that everything was copied from the document linked in the description, and that document doesn't give any explanations.

@piotro888 piotro888 linked an issue Nov 12, 2023 that may be closed by this pull request
Copy link
Member

Choose a reason for hiding this comment

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

This action is not valid and fails on your fork because of some yaml syntax error: https://github.com/makz00/coreblocks/actions/runs/6825022147

@tilk
Copy link
Member

tilk commented Nov 13, 2023

Suggestion: remove the "cocotb test results" thing, parse the results file in "Run regression tests" and fail the workflow if there are any failed test cases there.

@makz00 makz00 marked this pull request as ready for review November 19, 2023 02:33
@tilk
Copy link
Member

tilk commented Nov 20, 2023

Suggestion: do the failure check in run_regressions_with_cocotb in run_tests.py.

.github/workflows/main.yml Outdated Show resolved Hide resolved
@tilk
Copy link
Member

tilk commented Nov 27, 2023

In the interest of having this issue solved, I'm merging this without reviews, leaving the suggested change for later.

@tilk tilk merged commit bfc0445 into kuznia-rdzeni:master Nov 27, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix reporting regression test results on PRs from forks
4 participants