Skip to content

Commit

Permalink
Merge pull request #1 from minicli/0.2
Browse files Browse the repository at this point in the history
[WIP V0.2] Added tests, abstracted Client implementation
  • Loading branch information
erikaheidi authored Mar 15, 2022
2 parents 0de3ad6 + 6688fc9 commit 5805891
Show file tree
Hide file tree
Showing 12 changed files with 4,863 additions and 53 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: PHP Composer

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Validate composer.json and composer.lock
run: composer validate

- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Run test suite
run: composer test

- name: Run php-cs-fixer
run: composer csfix
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.idea
.php-cs-fixer.cache
.phpunit.result.cache
vendor/
17 changes: 17 additions & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

$finder = PhpCsFixer\Finder::create()
->in([__DIR__ . '/src', __DIR__ . '/tests'])
->name('*.php')
;


$config = new PhpCsFixer\Config();
return $config->setRules([
'@PSR12' => true,
'array_syntax' => ['syntax' => 'short'],
'full_opening_tag' => true,
'no_closing_tag' => true,
])
->setFinder($finder)
;
11 changes: 10 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@
}
},
"require": {
"ext-curl": "*"
"ext-curl": "*",
"ext-json": "*",
"friendsofphp/php-cs-fixer": "^3.7"
},
"require-dev": {
"pestphp/pest": "^1.21"
},
"scripts": {
"test" : ["pest"],
"csfix": ["php-cs-fixer fix"]
}
}
Loading

0 comments on commit 5805891

Please sign in to comment.