Skip to content

Commit 03c726f

Browse files
committed
Added some simple CI
1 parent 2484d3f commit 03c726f

File tree

11 files changed

+363
-384
lines changed

11 files changed

+363
-384
lines changed

.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: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: CI
2+
3+
on:
4+
pull_request: ~
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
11+
build:
12+
name: Build
13+
runs-on: ubuntu-latest
14+
strategy:
15+
fail-fast: false
16+
17+
steps:
18+
- name: Set up PHP
19+
uses: shivammathur/[email protected]
20+
with:
21+
php-version: 7.4
22+
coverage: none
23+
24+
- name: Checkout code
25+
uses: actions/checkout@v2
26+
27+
- name: Download dependencies
28+
run: |
29+
composer update --no-interaction --prefer-dist --optimize-autoloader
30+
./vendor/bin/simple-phpunit install
31+
32+
- name: Run tests
33+
env:
34+
SYMFONY_REQUIRE: 4.4.*
35+
GITHUB_TOKEN: ${{ secrets.CARSONTEST_GITHUB_TOKEN }}
36+
run: |
37+
./vendor/bin/simple-phpunit

.github/workflows/static.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Static analysis
2+
3+
on:
4+
pull_request: ~
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
phpstan:
11+
name: PHPStan
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Set up PHP
16+
uses: shivammathur/[email protected]
17+
with:
18+
php-version: '7.4'
19+
coverage: none
20+
21+
- name: Checkout code
22+
uses: actions/checkout@v2
23+
24+
- name: Download dependencies
25+
run: |
26+
composer update --no-interaction --prefer-dist --optimize-autoloader
27+
28+
- name: PHPStan
29+
uses: docker://oskarstark/phpstan-ga:0.12.48
30+
with:
31+
entrypoint: /composer/vendor/bin/phpstan
32+
args: analyze --no-progress
33+
34+
php-cs-fixer:
35+
name: PHP-CS-Fixer
36+
runs-on: ubuntu-latest
37+
38+
steps:
39+
- name: Checkout code
40+
uses: actions/checkout@v2
41+
42+
- name: PHP-CS-Fixer
43+
uses: docker://oskarstark/php-cs-fixer-ga:2.16.4
44+
with:
45+
args: --dry-run --diff-format udiff
46+
47+
psalm:
48+
name: Psalm
49+
runs-on: ubuntu-latest
50+
steps:
51+
- name: Checkout code
52+
uses: actions/checkout@v2
53+
54+
- name: Psalm
55+
uses: docker://vimeo/psalm-github-actions:3.17.2
56+
with:
57+
args: --no-progress --show-info=false --stats

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@
1313
/var/
1414
/vendor/
1515
###< symfony/framework-bundle ###
16+
17+
.php_cs.cache

.php_cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
$finder = PhpCsFixer\Finder::create()
4+
->in(__DIR__.'/src')
5+
->in(__DIR__.'/tests')
6+
;
7+
8+
return PhpCsFixer\Config::create()
9+
->setRiskyAllowed(false)
10+
->setRules([
11+
'@PSR2' => true,
12+
'@Symfony' => true,
13+
'array_syntax' => ['syntax' => 'short'],
14+
])
15+
->setFinder($finder)
16+
;

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@
99
"nyholm/psr7": "^1.3",
1010
"sensio/framework-extra-bundle": "^5.1",
1111
"symfony/console": "^5.1",
12+
"symfony/dotenv": "^5.1",
1213
"symfony/flex": "^1.8",
1314
"symfony/framework-bundle": "^5.1",
1415
"symfony/http-client": "^5.1",
1516
"symfony/monolog-bundle": "~3.5",
17+
"symfony/security-core": "5.1.*",
1618
"symfony/twig-pack": "^1.0",
17-
"symfony/yaml": "^5.1",
18-
"symfony/dotenv": "^5.1"
19+
"symfony/yaml": "^5.1"
1920
},
2021
"conflict": {
2122
"symfony/symfony": "*"

0 commit comments

Comments
 (0)