Skip to content

Grouping test output by Bundle in Github Actions #7920

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

Merged
merged 2 commits into from
May 2, 2025

Conversation

mamazu
Copy link
Contributor

@mamazu mamazu commented Apr 27, 2025

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets -
Related issues/PRs -
License MIT
Documentation PR -

What's in this PR?

image

Why?

With the amount of output the tests produce you have to scroll a lot when the first components fail. And the search isn't helping 'cause it only sometimes works.

This way you can just expand the section(s) that are broken.

@mamazu mamazu force-pushed the github-section-output branch 4 times, most recently from 8a1a27a to 217f67c Compare April 27, 2025 10:32
@mamazu mamazu marked this pull request as ready for review April 27, 2025 10:49
@mamazu mamazu changed the title Adding output grouping Grouping test output in Github Actions Apr 28, 2025
@mamazu mamazu changed the title Grouping test output in Github Actions Grouping test output by Bundle in Github Actions Apr 28, 2025
@mamazu mamazu changed the base branch from 3.0 to 2.5 May 2, 2025 08:51
@mamazu mamazu force-pushed the github-section-output branch from 217f67c to 9645fe3 Compare May 2, 2025 08:52
@mamazu
Copy link
Contributor Author

mamazu commented May 2, 2025

The output should only occur on CI, so we should add an Environment variable and check for it.

@mamazu mamazu self-assigned this May 2, 2025
Comment on lines 11 to 12
env:
IS_GITHUB_ACTION: 1
Copy link
Member

Choose a reason for hiding this comment

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

would more go with explicit name like CI_GROUP_OUTPUT=1

else we would not require to define an own variable as I think github would always set GITHUB_ACTIONS=true: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables

I'm fine with both changes.

@mamazu mamazu force-pushed the github-section-output branch 2 times, most recently from cced545 to e421ff3 Compare May 2, 2025 10:04
@mamazu
Copy link
Contributor Author

mamazu commented May 2, 2025

@alexander-schranz Looks weird with the true, but still works.

@alexander-schranz alexander-schranz force-pushed the github-section-output branch from e421ff3 to dde5379 Compare May 2, 2025 10:40
@alexander-schranz alexander-schranz merged commit 5112d9f into sulu:2.5 May 2, 2025
8 of 9 checks passed
@mamazu mamazu deleted the github-section-output branch May 2, 2025 13:36
}
echo "\n";

if (false === $input->getOption('no-component-tests') || $input->getOption('all')) {
write_header('Components');
Copy link
Member

@alexander-schranz alexander-schranz May 8, 2025

Choose a reason for hiding this comment

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

@mamazu we should put the components also into an own collapsed group, else its a little bit confusing currently.

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.

2 participants