Skip to content

Commit 4310282

Browse files
Nyholmnorkunas
authored andcommitted
Adding github actions (#243)
* Adding github actions * Remove PHPStan from travis * Updated syntax * Removed bc test * Added style CI as action * fixes * test stiff * Typo * Adding cs breaks * Removed debug * fix * updating gitignore * Hide progress
1 parent bba1456 commit 4310282

File tree

5 files changed

+36
-29
lines changed

5 files changed

+36
-29
lines changed

.github/workflows/main.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
on: [push]
2+
name: Static analysis
3+
jobs:
4+
phpstan:
5+
name: PHPStan
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@master
9+
- name: PHPStan
10+
uses: docker://oskarstark/phpstan-ga
11+
with:
12+
args: analyze --no-progress
13+
14+
php-cs-fixer:
15+
name: PHP-CS-Fixer
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@master
19+
- name: PHP-CS-Fixer
20+
uses: docker://oskarstark/php-cs-fixer-ga
21+
with:
22+
args: --dry-run --diff-format udiff

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
build/
21
composer.lock
32
composer.phar
43
phpunit.xml
54
vendor/
5+
.php_cs.cache

.php_cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?php
22

3-
/*
4-
* In order to make it work, fabpot/php-cs-fixer and sllh/php-cs-fixer-styleci-bridge must be installed globally
5-
* with composer.
6-
*
7-
* @link https://github.com/Soullivaneuh/php-cs-fixer-styleci-bridge
8-
* @link https://github.com/FriendsOfPHP/PHP-CS-Fixer
9-
*/
10-
11-
use SLLH\StyleCIBridge\ConfigBridge;
12-
13-
return ConfigBridge::create();
3+
$finder = PhpCsFixer\Finder::create()
4+
->in(__DIR__)
5+
->exclude(__DIR__.'/vendor')
6+
;
7+
return PhpCsFixer\Config::create()
8+
->setRules([
9+
'@Symfony' => true,
10+
'array_syntax' => ['syntax' => 'short'],
11+
])
12+
->setFinder($finder)
13+
;

.styleci.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

.travis.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ matrix:
2424
- php: 7.0
2525
- php: 7.1
2626
- php: 7.2
27-
env: COVERAGE=true PHPUNIT_FLAGS="-v --testsuite main --coverage-text --coverage-clover=build/coverage.xml" DEPENDENCIES="phpstan/phpstan"
27+
- php: 7.3
28+
env: COVERAGE=true PHPUNIT_FLAGS="-v --testsuite main --coverage-text --coverage-clover=build/coverage.xml"
2829

2930
- php: 7.1
3031
# We need `--prefer-source`, otherwise the `Doctrine\Tests\OrmTestCase` class won't be found.
@@ -54,10 +55,6 @@ install:
5455
script:
5556
- composer validate --strict --no-check-lock
5657
- ./vendor/bin/simple-phpunit $PHPUNIT_FLAGS
57-
- |
58-
if [[ $COVERAGE == true ]]; then
59-
vendor/bin/phpstan analyze -c phpstan.neon.dist --no-interaction --no-progress
60-
fi
6158

6259
after_success:
6360
- if [[ $COVERAGE = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi

0 commit comments

Comments
 (0)