Skip to content

Commit 6c719f6

Browse files
authored
Improve CI (#8)
* Improve CI * Dont commit lock file * Move to src * Update autoload config * cs fixes * Fixed tests * cs * Dont use phpunit bridge * fixed typo * support phpunit8 * fix
1 parent bed00ee commit 6c719f6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+281
-1208
lines changed

.gitattributes

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
.editorconfig export-ignore
22
.gitattributes export-ignore
33
.gitignore export-ignore
4+
/.github export-ignore
45
/.php_cs export-ignore
5-
/.styleci.yml export-ignore
6-
/.scrutinizer.yml export-ignore
7-
/.travis.yml export-ignore
86
/phpunit.xml.dist export-ignore
97
/Tests/ export-ignore

.github/FUNDING.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# These are supported funding model platforms
2+
3+
github: [Nyholm]

.github/workflows/.editorconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[*.yml]
2+
indent_size = 2

.github/workflows/ci.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Tests
2+
on: [ pull_request ]
3+
4+
jobs:
5+
phpunit:
6+
name: PHPUnit
7+
runs-on: ubuntu-latest
8+
strategy:
9+
max-parallel: 10
10+
matrix:
11+
php: [ '7.2', '7.3', '7.4', '8.0' ]
12+
sf_version: [ '4.4.*', '5.3.*' ]
13+
14+
steps:
15+
- name: Set up PHP
16+
uses: shivammathur/[email protected]
17+
with:
18+
php-version: ${{ matrix.php }}
19+
coverage: none
20+
tools: flex
21+
22+
- name: Checkout code
23+
uses: actions/checkout@v2
24+
25+
- name: Download dependencies
26+
env:
27+
SYMFONY_REQUIRE: ${{ matrix.sf_version }}
28+
uses: ramsey/composer-install@v1
29+
30+
- name: Run tests
31+
run: ./vendor/bin/phpunit
32+
33+
lowest:
34+
name: Lowest deps
35+
runs-on: ubuntu-latest
36+
steps:
37+
- name: Set up PHP
38+
uses: shivammathur/[email protected]
39+
with:
40+
php-version: 7.3
41+
coverage: none
42+
43+
- name: Checkout code
44+
uses: actions/checkout@v2
45+
46+
- name: Download dependencies
47+
with:
48+
dependency-versions: "lowest"
49+
uses: ramsey/composer-install@v1
50+
51+
- name: Run tests
52+
env:
53+
SYMFONY_DEPRECATIONS_HELPER: "max[self]=0"
54+
run: ./vendor/bin/phpunit

.github/workflows/static.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
on: [pull_request]
2+
name: Static analysis
3+
4+
jobs:
5+
phpstan:
6+
name: PHPStan
7+
runs-on: ubuntu-20.04
8+
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v2
12+
13+
- name: Setup PHP
14+
uses: shivammathur/setup-php@v2
15+
with:
16+
php-version: 8.0
17+
coverage: none
18+
tools: phpstan:0.12.92, cs2pr
19+
20+
- name: Download dependencies
21+
uses: ramsey/composer-install@v1
22+
23+
- name: PHPStan
24+
run: phpstan analyze --no-progress --error-format=checkstyle | cs2pr
25+
26+
php-cs-fixer:
27+
name: PHP-CS-Fixer
28+
runs-on: ubuntu-20.04
29+
30+
steps:
31+
- name: Checkout code
32+
uses: actions/checkout@v2
33+
34+
- name: Setup PHP
35+
uses: shivammathur/setup-php@v2
36+
with:
37+
php-version: 8.0
38+
coverage: none
39+
tools: php-cs-fixer:2.19.0, cs2pr
40+
41+
- name: PHP-CS-Fixer
42+
run: php-cs-fixer fix --dry-run --format=checkstyle | cs2pr
43+
44+
psalm:
45+
name: Psalm
46+
runs-on: ubuntu-20.04
47+
steps:
48+
- name: Checkout code
49+
uses: actions/checkout@v2
50+
51+
- name: Setup PHP
52+
uses: shivammathur/setup-php@v2
53+
with:
54+
php-version: 8.0
55+
coverage: none
56+
tools: vimeo/psalm:4.8.1
57+
58+
- name: Download dependencies
59+
uses: ramsey/composer-install@v1
60+
61+
- name: Psalm
62+
run: psalm --no-progress --output-format=github
63+
64+
composer-normalize:
65+
name: Composer Normalize
66+
runs-on: ubuntu-20.04
67+
68+
steps:
69+
- name: Setup PHP
70+
uses: shivammathur/setup-php@v2
71+
with:
72+
php-version: 8.0
73+
coverage: none
74+
tools: composer-normalize
75+
76+
- name: Checkout code
77+
uses: actions/checkout@v2
78+
79+
- name: Normalize
80+
run: composer-normalize --dry-run

.gitignore

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/php_cs.cache
2-
/composer.lock
3-
/phpunit.xml
4-
/vendor/
1+
.php_cs.cache
2+
.phpunit.result.cache
3+
composer.lock
4+
phpunit.xml
5+
vendor/

.php_cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ $finder = PhpCsFixer\Finder::create()
88
return PhpCsFixer\Config::create()
99
->setRules([
1010
'@Symfony' => true,
11-
'array_syntax' => ['syntax' => 'short'],
1211
])
1312
->setFinder($finder)
14-
;
13+
;

.scrutinizer.yml

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

.styleci.yml

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

.travis.yml

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

0 commit comments

Comments
 (0)