Skip to content

Commit

Permalink
Merge 805ff89 into b806d72
Browse files Browse the repository at this point in the history
  • Loading branch information
webda2l committed Dec 18, 2019
2 parents b806d72 + 805ff89 commit fc2efe8
Show file tree
Hide file tree
Showing 23 changed files with 348 additions and 578 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE.md
Expand Up @@ -10,10 +10,10 @@

### Environment

#### Symfony packages
#### Composer packages

```
$ composer show --latest 'symfony/*'
$ composer show
# Put the result here.
```

Expand Down
1 change: 0 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Expand Up @@ -25,7 +25,6 @@ Closes #{put_issue_number_here}
<!-- REMOVE EMPTY SECTIONS -->
```markdown
### Added
- Added some `Class::newMethod` to do great stuff

### Changed

Expand Down
114 changes: 114 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,114 @@
name: CI

on: ["push", "pull_request"]

env:
COMPOSER_ALLOW_SUPERUSER: '1'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
container:
image: php:7.4-alpine
options: >-
--tmpfs /tmp:exec
--tmpfs /var/tmp:exec
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install Composer
run: wget -qO - https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --quiet
- name: Cache Composer dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache
key: composer-php${{ matrix.php }}-highest-${{ github.sha }}
restore-keys: |
composer-php${{ matrix.php }}-highest-
composer-
- name: Composer install
run: composer install --no-progress --no-suggest --ignore-platform-reqs --ansi
- name: Disable PHP memory limit
run: echo 'memory_limit=-1' >> /usr/local/etc/php/php.ini
- name: Analyze
run: vendor/bin/phpqa --execution no-parallel --progress-delay=-1 --ansi

phpunit:
name: PHPUnit (PHP ${{ matrix.php }} Deps ${{ matrix.dependencies }})
runs-on: ubuntu-latest
container:
image: php:${{ matrix.php }}-alpine
options: >-
--tmpfs /tmp:exec
--tmpfs /var/tmp:exec
strategy:
matrix:
php:
- '7.2'
- '7.3'
- '7.4'
dependencies:
- lowest
- highest
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install Composer
run: wget -qO - https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --quiet
- name: Cache Composer dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache
key: composer-php${{ matrix.php }}-${{ matrix.dependencies }}-${{ github.sha }}
restore-keys: |
composer-php${{ matrix.php }}-${{ matrix.dependencies }}-
composer-
- name: Install lowest dependencies with Composer
if: matrix.dependencies == 'lowest'
run: composer install --no-progress --no-suggest --prefer-lowest --ignore-platform-reqs --ansi
- name: Install highest dependencies with Composer
if: matrix.dependencies == 'highest'
run: composer install --no-progress --no-suggest --ignore-platform-reqs --ansi
- name: Run tests with PHPUnit
run: vendor/bin/phpunit --colors=always

phpunit-coverage:
name: PHPUnit coverage (PHP ${{ matrix.php }})
runs-on: ubuntu-latest
container:
image: php:${{ matrix.php }}-alpine
options: >-
--tmpfs /tmp:exec
--tmpfs /var/tmp:exec
strategy:
matrix:
php:
- '7.4'
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install pcov PHP extension
run: |
apk add $PHPIZE_DEPS
pecl install pcov
docker-php-ext-enable pcov
- name: Install Composer
run: wget -qO - https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --quiet
- name: Cache Composer dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache
key: composer-php${{ matrix.php }}-highest-${{ github.sha }}
restore-keys: |
composer-php${{ matrix.php }}-highest-
composer-
- name: Install highest dependencies with Composer
run: composer install --no-progress --no-suggest --ignore-platform-reqs --ansi
- name: Run coverage with PHPUnit
run: vendor/bin/phpunit --coverage-clover ./clover.xml --colors=always
- name: Send code coverage report to Codecov.io
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: bash <(curl -s https://codecov.io/bash)
3 changes: 2 additions & 1 deletion .gitignore
@@ -1,3 +1,4 @@
.php_cs.cache
.phpunit.result.cache
composer.lock
vendor/*
vendor/*
21 changes: 10 additions & 11 deletions .php_cs.dist
Expand Up @@ -13,25 +13,24 @@ return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules([
'@DoctrineAnnotation' => true,
'@PHP70Migration' => true,
'@PHP70Migration:risky' => true,
'@PHP71Migration' => true,
'@PHP71Migration:risky' => true,
'@PHPUnit60Migration:risky' => true,
'@PHP73Migration' => true,
'@PHPUnit75Migration:risky' => true,
'@PhpCsFixer' => true,
'@PhpCsFixer:risky' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'array_syntax' => ['syntax' => 'short'],
'combine_consecutive_issets' => true,
'combine_consecutive_unsets' => true,
'general_phpdoc_annotation_remove' => ['param', 'return'],
'date_time_immutable' => true,
'header_comment' => ['header' => $header],
'general_phpdoc_annotation_remove' => true,
'linebreak_after_opening_tag' => true,
'list_syntax' => ['syntax' => 'short'],
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_class_elements' => true,
'ordered_imports' => true,
'phpdoc_order' => true,
'strict_comparison' => true,
'strict_param' => true,
'no_superfluous_phpdoc_tags' => true,
'php_unit_strict' => false,
])
->setFinder(
PhpCsFixer\Finder::create()
Expand Down
13 changes: 13 additions & 0 deletions .phpqa.yml
@@ -0,0 +1,13 @@
phpqa:
tools:
- php-cs-fixer:0
- phpunit:0
- psalm:0
- security-checker:0
output: cli

php-cs-fixer:
config: .php_cs.dist

psalm:
config: psalm.xml
61 changes: 0 additions & 61 deletions .travis.yml

This file was deleted.

0 comments on commit fc2efe8

Please sign in to comment.