-
Notifications
You must be signed in to change notification settings - Fork 73
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
Create GitHub workflows #208
Conversation
@@ -0,0 +1,61 @@ | |||
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions | |||
|
|||
name: "Static Analysis by PHPStan" |
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.
Are these perhaps extracted from ProxyManager or such? Looks very familiar :D
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.
From BetterReflection :P
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.
🚢 good work!
uses: "actions/cache@v2" | ||
with: | ||
path: | | ||
~/.composer/cache |
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.
Does Composer on Windows store the caches here?
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.
Probably not, but given that we use a composer.lock
, perhaps we can avoid this caching step overall?
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.
Well, there are "lowest" and "highest" deps in the matrix, which trigger composer update
, which uses cache...
~/.composer/cache | ||
vendor | ||
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}" | ||
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}" |
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.
restore-keys
should have php-${{ matrix.php-version }}-
instead, the original key is assumed.
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.
And the key is lacking ${{ hashFiles('composer.*') }}
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 might open a PR with a comprehensive fix, if that's desirable.
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.
@sanmai if you think the caching is botched and you have the time/will to do so, please do :)
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.
Sure thing: #227
This PR aims to add GitHub workflows in favor of travis and appveyor.
I think all the ci jobs are ported from travis beside of the nightly build check. I dont know if a solution exists atm but last time i checked this was not really possible in a "clean" way. See: actions/runner#2347
I also realized that we dont have any cs check atm. Maybe we should add them in the near future?
Also i think Action are not enabled yet here. See my test PR on my Repo for the output: DanielBadura#2
I mostly check at BetterReflection as a reference since I work more with GitLab-CI 🤖
I quite dont understand this part:
Is
on: pull_request: branches: [master]
the default? Because i would think with this config workflow should only run if commits gets pushed into master. So i would expect this:Because no job ran on the first commit i tried it in the psalm workflow but without success. So i figured that action are not enabled here and checked on my repo. There all workflows are running on the PR with or without
on: pull_request: branches: [master]