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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix potential github action smells #3449
base: develop
Are you sure you want to change the base?
Conversation
- Avoid running CI related actions when no source code has changed - Avoid executing scheduled workflows on forks - Avoid jobs without timeouts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks!
Plenty more we could do, too, but these hit some really big sources of noise. 馃憤
Also, a thought for future consideration for us before it disappears from my head again: Especially with regards to Roslyn analyzers/generators, we may want to consider caching, so that they don't have to get built every time, unless one of the analyzer projects is actually modified. Would speed up the build actions. Efficiency of those actions does matter, because there is a limit to how much execution time is allowed per month. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still fine to me, regardless of comments I just added.
Those are notes for me while I'm completely re-working things and aren't related to the changes made.
@@ -4,6 +4,8 @@ on: | |||
push: | |||
# only publish v2 (main or develop); v2 is published via the Terminal.GuiV2Docs repo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment here is not quite accurate with what this actually does.
@@ -29,6 +29,7 @@ jobs: | |||
# Consider using larger runners for possible analysis time improvements. | |||
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could clean this up, too, if we use an actual matrix.
And the default comments from the template are not relevant for us, so they could go away.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually... This is codeQL scanning and we do not have OS-specific dependencies.
We could do it on just one runner for this workflow unless anyone has any thoughts otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, what runner would in that case take your preference? The Ubuntu one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May as well be that one. Likely to have the lowest total running time cost.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes clear!
@@ -29,6 +29,7 @@ jobs: | |||
# Consider using larger runners for possible analysis time improvements. | |||
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} | |||
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} | |||
if: github.repository == 'gui-cs/Terminal.Gui'|| github.event_name == 'schedule' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the best part of it all. Thanks for getting fed up and doing it! :)
It's so noisy for forks, for various other reasons.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries, thank you for the feedback, very appreciated! 馃槃
Fixes
Hey! 馃檪
I want to contribute the following changes to your workflow:
(These changes are part of a research Study at TU Delft looking at GitHub Action Smells. Find out more)
Proposed Changes/Todos
Pull Request checklist:
CTRL-K-D
to automatically reformat your files before committing.dotnet test
before commit///
style comments)