Skip to content

Commit

Permalink
ci: add ci jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
shyim committed Sep 3, 2024
1 parent c1c04e9 commit 8773e0e
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 4 deletions.
41 changes: 40 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,46 @@ on:
workflow_dispatch:

jobs:
tests-php8:
cs-fix:
name: CS Fixer
runs-on: ubuntu-22.04

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'

- name: Install dependencies
run: composer install

- name: Run CS Fixer
run: composer run-script cs

phpstan:
name: PHPStan
runs-on: ubuntu-22.04

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'

- name: Install dependencies
run: composer install

- name: Run CS Fixer
run: composer run-script phpstan

tests:
name: PHPUnit on PHP ${{ matrix.php-versions }}
runs-on: ubuntu-22.04

strategy:
Expand Down
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
},
"scripts": {
"test": "vendor/bin/phpunit",
"cs-fix": "vendor/bin/php-cs-fixer fix"
"cs": "vendor/bin/php-cs-fixer fix --dry-run",
"cs-fix": "vendor/bin/php-cs-fixer fix",
"phpstan": "vendor/bin/phpstan"
}
}
5 changes: 4 additions & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
parameters:
level: 5
level: 5
paths:
- src
- tests
1 change: 0 additions & 1 deletion tests/Rize/UriTemplateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
*
* http://tools.ietf.org/html/rfc6570
*/
#[Covers(UrlTemplate::class)]
class UriTemplateTest extends TestCase
{
public function service($uri = '', $params = [])
Expand Down

0 comments on commit 8773e0e

Please sign in to comment.