-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add GitHub Actions workflow #740
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
Conversation
bfc2432 to
e930e07
Compare
|
:/ hm, so https://github.com/mglaman/PHP-Parser/actions/runs/407264322 |
.github/workflows/main.yml
Outdated
| on: | ||
| push: | ||
| pull_request: | ||
| branches: | ||
| - "master" |
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 way it runs on all branch bushes, but only PRs against master.
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 is possible to make it run for all commits/PRs, regardless of branch? Other branches don't get used much right now, as there's currently only one supported version, but generally we'd want CI for everything.
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.
Cool; can do. This is something I've copied around – it runs on push to any branch but only PRs on master. I can make sure it runs on all things
| # This is erroring, not sure why. | ||
| # - name: Coveralls | ||
| # run: "php vendor/bin/php-coveralls" | ||
| # if: ${{ success() }} |
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 was failing: https://github.com/mglaman/PHP-Parser/runs/1514718327?check_suite_focus=true. Maybe due to a required secret.
|
Is there something I need to do to make it run? Doesn't look like it runs in the PR. |
.github/workflows/main.yml
Outdated
| php-version: "8.0" | ||
| tools: composer:v2 | ||
| - name: "Install PHP 8 dependencies" | ||
| run: "composer update --ignore-platform-req=php --no-progress --prefer-dist" |
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 ignore-platform-req is probably not needed anymore?
|
So I thought it would run on the PR, but not until it's merged. So it currently only runs on the branch push for my fork. After this is merged things would start running. |
|
Re-run after suggestions addressed: https://github.com/mglaman/PHP-Parser/actions/runs/409233894 |
|
Looks like it does work fine once merged: https://github.com/nikic/PHP-Parser/actions/runs/409258444 The T_DOUBLE_COLON issue sounds like ext-tokenizer isn't enabled. That's probably due to the PHP-Parser/test_old/run-php-src.sh Line 5 in 5e36ef7
|
|
Dropped the Only remaining question is the coverage generation. |
|
Possibly need to specify COVERALLS_REPO_TOKEN: https://github.com/php-coveralls/php-coveralls#github-actions |
|
Awesome! |
|
@mglaman Thank you 👍 |
Fixes #737
I didn't delete
.travis.ymlin this PR. I figured it could linger or be a follow-up post merge.