Skip to content

Commit

Permalink
introduce ci pipeline (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
akondas authored Jun 2, 2024
1 parent fac8bd4 commit 897a908
Show file tree
Hide file tree
Showing 19 changed files with 2,137 additions and 2,362 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: ci

on:
pull_request:
push:
branches: [ master ]

jobs:
ci:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: "Installing PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "8.2"
ini-values: memory_limit=-1

- name: "Install composer dependencies"
uses: "ramsey/composer-install@v2"

- name: "Run ci script"
run: "composer ci"
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/vendor/
.php_cs.cache
.php-cs-fixer.cache
.phpunit.result.cache
/.idea/
19 changes: 13 additions & 6 deletions .php_cs → .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,39 @@
->in(__DIR__.'/tests')
;

return PhpCsFixer\Config::create()
$config = new PhpCsFixer\Config();

return $config
->setRiskyAllowed(true)
->setRules([
'@PHP71Migration' => true,
'@Symfony' => true,
'array_syntax' => ['syntax' => 'short'],
'no_superfluous_elseif' => true,
'no_superfluous_phpdoc_tags' => true,
'no_superfluous_phpdoc_tags' => ['allow_mixed' => true],
'no_unreachable_default_argument_value' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'no_unused_imports' => true,
'declare_strict_types' => true,
'ordered_imports' => [
'importsOrder' => null,
'sortAlgorithm' => 'alpha',
'imports_order' => null,
'sort_algorithm' => 'alpha',
],
'phpdoc_order' => true,
'phpdoc_align' => true,
'phpdoc_no_access' => true,
'phpdoc_separation' => true,
'pre_increment' => true,
'single_quote' => true,
'trim_array_spaces' => true,
'blank_lines_before_namespace' => false,
'single_blank_line_before_namespace' => true,
'yoda_style' => null,
'yoda_style' => [
'equal' => null,
'identical' => null,
'less_and_greater' => null,
'always_move_variable' => false,
],
// risky -->
'strict_param' => true,
])
Expand Down
9 changes: 0 additions & 9 deletions baseline.xml

This file was deleted.

24 changes: 0 additions & 24 deletions buddy.yml

This file was deleted.

22 changes: 11 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,15 @@
}
],
"require": {
"php": ">=7.4",
"php": "^8.2",
"fale/isbn": "^3.1",
"munusphp/munus": "^0.15",
"myclabs/php-enum": "^1.7",
"ramsey/uuid": "^3.8",
"munusphp/munus": "^0.2",
"fale/isbn": "^3.1"
"ramsey/uuid": "^4.7"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.15",
"phpunit/phpunit": "^8.4",
"vimeo/psalm": "^3.6",
"psalm/plugin-phpunit": "^0.10",
"friendsofphp/php-cs-fixer": "^3.58",
"phpunit/phpunit": "^9.6",
"behat/behat": "^3.5"
},
"autoload": {
Expand All @@ -47,12 +45,14 @@
"behat": [
"behat"
],
"tests": [
"ci": [
"composer validate",
"@check-cs",
"psalm",
"phpunit",
"@behat"
]
},
"config": {
"sort-packages": true
}

}
Loading

0 comments on commit 897a908

Please sign in to comment.