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
Run static code analysis off GitHub Actions #5295
Conversation
Great idea! 👍🏻
Let me finish with changed files checks, and I’ll do just that.
|
It seems we're good to go: https://github.com/sanmai/PHP-CS-Fixer/runs/1447402026?check_suite_focus=true |
git diff --name-only --diff-filter=ACMRTUXB HEAD~..HEAD | grep -E "\.php$" || true | ||
echo 'CHANGED_PHP_FILES<<EOF' >> $GITHUB_ENV | ||
git diff --name-only --diff-filter=ACMRTUXB HEAD~..HEAD | grep -E "\.php$" || true >> $GITHUB_ENV | ||
echo 'EOF' >> $GITHUB_ENV |
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.
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.
i just hope this section works
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 part is from Travis CI, and the other part I took from Infection CI.
Even if these don't work for some unknown reason, we should have plenty of the debugging output. I'll be here to fix any issues.
command: | | ||
./dev-tools/install.sh | ||
|
||
- name: Run checks |
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.
It seems we're good to go: https://github.com/sanmai/PHP-CS-Fixer/runs/1447402026?check_suite_focus=true
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.
Just the noise from GH actions wrapper. You can see it at every step.
I think they're trying to tell us which shell we're using, and with which arguments.
- name: Run checks | ||
run: | | ||
./dev-tools/check_file_permissions.sh | ||
./dev-tools/check_trailing_spaces.sh |
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.
question: will check_trailing_spaces
executes if check_file_permissions
would report issue?
(we don't want to execute in such case, and with Travis we had to always kill the flow manually with travis_terminate
)
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.
It will stop right then right here because the shell runs with set -e
. Note the -e
argument to bash
above.
This PR was merged into the 2.16 branch. Discussion ---------- Add yamllint workflow, validates .yaml files This has two effects: - It will validate `.yaml` files for general correctness everywhere except `vendor` and `dev-tools/vendor` - And as a side-effect, it might enable other workflows to happen. E.g. we will no longer need to consult with forks to see if #5295 #5268 #5183 etc are working. Commits ------- f6cdee1 Add yamllint workflow
Add changed files check, disable the same checks from Travis CI Remove conflict with HHVM
Rebased. Should be showing the status right here. |
Thank you @sanmai. |
How it looks like: https://github.com/sanmai/PHP-CS-Fixer/runs/1447402026?check_suite_focus=true