-
Notifications
You must be signed in to change notification settings - Fork 39
Add GitHub actions #122
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
Add GitHub actions #122
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
47e4384
Add composer normalize
sagikazarmark 9a23e29
Improve php cs fixer
sagikazarmark a853884
Run php cs fixer
sagikazarmark 03ea4f1
Add phpstan config
sagikazarmark 1fd5c2c
Add github actions
sagikazarmark cfa22ca
Remove license badge
sagikazarmark cca684f
Drop travis
sagikazarmark 257e65c
Drop styleci
sagikazarmark 209c486
Drop scrutinizer
sagikazarmark File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,12 @@ | ||
.editorconfig export-ignore | ||
.gitattributes export-ignore | ||
/.github/ export-ignore | ||
.gitignore export-ignore | ||
/.php_cs export-ignore | ||
/.scrutinizer.yml export-ignore | ||
/.styleci.yml export-ignore | ||
/.travis.yml export-ignore | ||
/behat.yml.dist export-ignore | ||
/features/ export-ignore | ||
/phpspec.ci.yml export-ignore | ||
/phpspec.yml.dist export-ignore | ||
/phpunit.xml.dist export-ignore | ||
/spec/ export-ignore | ||
/tests/ export-ignore | ||
.editorconfig export-ignore | ||
.gitattributes export-ignore | ||
/.github/ export-ignore | ||
.gitignore export-ignore | ||
/.php_cs.dist export-ignore | ||
/phpspec.ci.yml export-ignore | ||
/phpspec.yml.dist export-ignore | ||
/phpstan-baseline.neon export-ignore | ||
/phpstan.neon.dist export-ignore | ||
/phpunit.xml.dist export-ignore | ||
/spec/ export-ignore | ||
/tests/ export-ignore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[*.yml] | ||
indent_size = 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Checks | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
composer-normalize: | ||
name: Composer Normalize | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v1 | ||
|
||
- name: Install | ||
uses: docker://composer | ||
with: | ||
args: install | ||
|
||
- name: Normalize | ||
uses: docker://composer | ||
with: | ||
args: composer normalize --dry-run | ||
|
||
roave-bc-check: | ||
name: Roave BC Check | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v1 | ||
|
||
- name: Roave BC Check | ||
uses: docker://nyholm/roave-bc-check-ga |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
build-lowest-version: | ||
name: Build lowest version | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Set up PHP | ||
uses: shivammathur/[email protected] | ||
with: | ||
php-version: '7.1' | ||
coverage: xdebug | ||
extensions: mbstring | ||
|
||
- name: Setup Problem Matchers for PHPUnit | ||
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v1 | ||
|
||
- name: Download dependencies | ||
run: composer update --prefer-stable --prefer-dist --no-interaction --no-progress --no-suggest --prefer-lowest | ||
|
||
- name: Run tests | ||
run: composer test-ci | ||
|
||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 10 | ||
matrix: | ||
php: ['7.1', '7.2', '7.3', '7.4'] | ||
|
||
steps: | ||
- name: Set up PHP | ||
uses: shivammathur/[email protected] | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: mbstring | ||
|
||
- name: Setup Problem Matchers for PHPUnit | ||
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v1 | ||
|
||
- name: Download dependencies | ||
run: composer update --prefer-stable --prefer-dist --no-interaction --no-progress --no-suggest | ||
|
||
- name: Run tests | ||
run: composer test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Static analysis | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
phpstan: | ||
name: PHPStan | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v1 | ||
|
||
- name: PHPStan | ||
uses: docker://oskarstark/phpstan-ga | ||
with: | ||
args: analyze --no-progress | ||
|
||
php-cs-fixer: | ||
name: PHP-CS-Fixer | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v1 | ||
|
||
- name: PHP-CS-Fixer | ||
uses: docker://oskarstark/php-cs-fixer-ga | ||
with: | ||
args: --dry-run --diff-format udiff |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
/behat.yml | ||
.php_cs | ||
.php_cs.cache | ||
/build/ | ||
/composer.lock | ||
/phpspec.yml | ||
/phpstan.neon | ||
/phpunit.xml | ||
/vendor/ |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
$config = PhpCsFixer\Config::create() | ||
->setRiskyAllowed(true) | ||
->setRules([ | ||
'@Symfony' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'single_line_throw' => false, | ||
]) | ||
->setFinder( | ||
PhpCsFixer\Finder::create() | ||
->in(__DIR__.'/src') | ||
->name('*.php') | ||
) | ||
; | ||
|
||
return $config; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
for my understanding: what does this line thing 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.
When tests fail, the output is parsed by GH actions and failures are listed separately from the build log. This helps parsing PHPUnit failures.